Skip to content

Conversation

@Marat-Tim
Copy link
Contributor

adds all motives of active lints to the Github pages branch

@Marat-Tim
Copy link
Contributor Author

I understand that there are many errors here, but I wanted to do something so that you could specifically point them out to me

@Marat-Tim Marat-Tim force-pushed the 65 branch 4 times, most recently from 65fd9ec to db25c7c Compare December 11, 2024 18:35
@yegor256
Copy link
Member

@Marat-Tim looks like a good start! Now, please, try to make all build jobs pass.

@Marat-Tim Marat-Tim force-pushed the 65 branch 4 times, most recently from 63cb8b0 to 525dc81 Compare January 29, 2025 15:18
@Marat-Tim
Copy link
Contributor Author

@yegor256 I'm ready for my code to be destroyed)

I have a few questions

  1. Do we collect the jar file somewhere and can we download it from there? Then from pom.xml it will be possible to remove the build plugin in jar

  2. I assume that the PrintAllLines class needs to be moved to a separate project. If I create a project in the repository, won't it break some kind of pipeline? And again, how can I connect the latest version of the main project to subproject?

  3. On behalf of whom to make a push request to the gh-pages branch? Now I've done it on my own login

  4. How good is the idea of JavaLint? After all, if I wrap it at the wrong moment (for example, after wrapping it in Unlint), the name will be lost. Or you'll have to recursively get the decorated object, which sounds pretty crooked

@Marat-Tim Marat-Tim changed the title feat(#65): mvp feat(#65): get lints for gh-pages in runtime Feb 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 23, 2025

🚀 Performance Analysis

All benchmarks are within the acceptable range. No critical degradation detected (threshold is 100%). Please refer to the detailed report for more information.

Click to see the detailed report
Test Base Score PR Score Change % Change Unit Mode
benchmarks.SourceBench.scansXmir (size=S) 5875.736 6033.971 158.235 2.69% ms/op Average Time
benchmarks.SourceBench.scansXmir (size=M) 6330.787 6485.224 154.437 2.44% ms/op Average Time
benchmarks.SourceBench.scansXmir (size=L) 7308.019 7469.824 161.806 2.21% ms/op Average Time
benchmarks.SourceBench.scansXmir (size=XL) 8632.580 8694.309 61.729 0.72% ms/op Average Time
benchmarks.SourceBench.scansXmir (size=XXL) 20930.917 21153.280 222.363 1.06% ms/op Average Time

⚠️ Performance loss: benchmarks.SourceBench.scansXmir (size=S) is slower by 158.235 ms/op (2.69%)
⚠️ Performance loss: benchmarks.SourceBench.scansXmir (size=M) is slower by 154.437 ms/op (2.44%)
⚠️ Performance loss: benchmarks.SourceBench.scansXmir (size=L) is slower by 161.806 ms/op (2.21%)
⚠️ Performance loss: benchmarks.SourceBench.scansXmir (size=XL) is slower by 61.729 ms/op (0.72%)
⚠️ Performance loss: benchmarks.SourceBench.scansXmir (size=XXL) is slower by 222.363 ms/op (1.06%)

@Marat-Tim
Copy link
Contributor Author

@yegor256 I updated and corrected the pull request. An example of how the gh-pages branch will be created with it can be viewed here

@yegor256
Copy link
Member

@Marat-Tim the SaveAll.java file is not in the right place. It's among feature files, which are shipped to the client in the final JAR. Should it be there? Maybe we can replace it with a Bash script?

@yegor256
Copy link
Member

yegor256 commented Apr 24, 2025

@h1alexbel please, take a look

@yegor256 yegor256 requested review from h1alexbel and yegor256 and removed request for yegor256 April 24, 2025 05:41
@Marat-Tim
Copy link
Contributor Author

@yegor256 We can't replace java code with bash if we want to get a list of motives in java runtime. I also tried to move this executable file to a separate subproject (similar to lints-it), but I ran into the problem that PkWpa and PkMono are not public classes, so the only way to use them is to write a file in the main project

Would it be better to just exclude this file from the build into the final jar? I just don't really understand which plugin this assembly is configured in, if you tell me, it will be very good for me.

@Marat-Tim Marat-Tim requested a review from h1alexbel April 25, 2025 12:59
Copy link
Member

@h1alexbel h1alexbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Marat-Tim check my comments, please

<version>4.1.1</version>
<configuration>
<scripts>
<script>./.github/motives.groovy</script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Marat-Tim let's move the script into src/main/groovy/org/eolang/lints/motives.groovy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@h1alexbel when I tried to do this, I got an error jcabi/jcabi-parent#586

I added a puzzle to this fix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@h1alexbel I'm not sure how to check this - could the presence of a groovy folder cause the entire Groovy runtime to be bundled into the final JAR?

Copy link
Member

@h1alexbel h1alexbel May 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Marat-Tim in the jcabi-parent, we have this groovy profile:

<profile>
  <!--
  Compile Groovy sources from src/main/groovy and src/test/groovy
  directories.
  -->
  <id>groovy</id>
  <activation>
    <file>
      <exists>${basedir}/src/main/groovy</exists>
    </file>
  </activation>
  <dependencies>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
      <version>3.0.24</version>
      <type>pom</type>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <version>4.2.0</version>
        <configuration>
          <verbose>true</verbose>
        </configuration>
        <executions>
          <execution>
            <id>jcabi-groovy</id>
            <goals>
              <goal>compile</goal>
              <goal>compileTests</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</profile>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@h1alexbel Honestly, I don't quite get it
When I run mvn install without any profiles, I see that classes from the groovy folder end up in target/classes
I'm concerned that this might cause the Groovy runtime to be bundled into the final JAR
Are my concerns unfounded?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Marat-Tim correct. Your Groovy scripts should be located in the target/classes. From there you can invoke them using gmavenplus-plugin passing path to the script:

<scripts>
  <script>src/main/groovy/org/eolang/lints/SaveMotives.groovy</script>
</scripts>


package org.eolang.lints

static def saveLint(Lint<?> lint) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Marat-Tim maybe we can setup tests for saveLint() method, in the src/test/groovy? Otherwise, we don't and won't know if we break something during the future modifications. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@h1alexbel when I tried to do this, I got an error jcabi/jcabi-parent#586

I added a puzzle to this fix

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Marat-Tim maybe you can remove the puzzle, since we released a new version of jcabi-parent?

@Marat-Tim
Copy link
Contributor Author

@h1alexbel

@maxonfjvipon
Copy link
Member

@h1alexbel please check this one

Copy link
Member

@h1alexbel h1alexbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Marat-Tim just one comment, please check

* This script saves a file with the lint name and extension .md to the tmp folder.
* The motive of this lint is preserved as content.
* These files are saved for all active lints in the project.
* @todo #65:30min after fixing this problem with creation of groovy folder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Marat-Tim let's make two todos for these issues:

  • "Move this script to the src/main/groovy folder."
  • "Write a test for motives.groovy"

@Marat-Tim Marat-Tim requested a review from h1alexbel April 27, 2025 16:40
Copy link
Member

@h1alexbel h1alexbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Marat-Tim LGTM

@h1alexbel
Copy link
Member

@yegor256 take a look, please

@Marat-Tim
Copy link
Contributor Author

@yegor256

@github-actions github-actions bot added the core Changes are made to core parts of the code base label May 12, 2025
Copy link
Member

@yegor256 yegor256 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a new version of jcabi-parent is available


package org.eolang.lints

static def saveLint(Lint<?> lint) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Marat-Tim maybe you can remove the puzzle, since we released a new version of jcabi-parent?

@Marat-Tim
Copy link
Contributor Author

@yegor256 Yes, I'm working on it right now - but I've got a question: #137 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes are made to core parts of the code base

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants