Skip to content

comment out the processor by default#4071

Merged
andimarek merged 1 commit into
masterfrom
jmh-processor
Jul 31, 2025
Merged

comment out the processor by default#4071
andimarek merged 1 commit into
masterfrom
jmh-processor

Conversation

@andimarek

Copy link
Copy Markdown
Member

Hey @dfa1 @bbakerman ,

unfortunately this really breaks idea rebuild/build functionality. We need to keep this commented out by default and put it back in if we want to run JMH tests from idea.

If you find another solution that would be great ... I spend some time finding one, but could not . 😢

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  322 files    322 suites   3m 30s ⏱️
5 003 tests 4 997 ✅ 6 💤 0 ❌
5 092 runs  5 086 ✅ 6 💤 0 ❌

Results for commit 623adc1.

@andimarek andimarek merged commit ec71af5 into master Jul 31, 2025
2 checks passed
@dondonz dondonz added this to the 25.x breaking changes milestone Aug 2, 2025
@dfa1

dfa1 commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

@andimarek I'm trying to reproduce the issue mentioned here.

If I uncomment the line above, I'm able to:

  • run build/rebuild operation in IntelliJ without issues
  • run tests without issues
  • run "gradle jmh" without issues
  • run again any tests within IntelliJ

Do you have a specific workflow that is broken?
Do you have these settings in IntelliJ? (don't remember if this default or not)
image

@andimarek

Copy link
Copy Markdown
Member Author

@dfa1 one thing we always use is the IntelliJ compiler instead of gradle because it is much faster:

Do you have the same?

Screenshot 2025-08-06 at 10 47 01 am

@dfa1

dfa1 commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

@dfa1 one thing we always use is the IntelliJ compiler instead of gradle because it is much faster:
ok this is nice to know

Do you have the same?
now yes... I got this error:

image

it is same error?

@bbakerman

Copy link
Copy Markdown
Member
Capto_Capture 2025-08-07_06-17-53_pm

I find that when I set "Builds via IDEA" in the gradle runner I have problems where the ANTLR generator task does not run

Task :generateGrammarSource

and then get compilation errors. but if I clean and build and something else generates the grammar source - it works

I alo noticed that idea.version is set when the gradle is rub by idea versus the command line. I wonder if we can some how use that in some way

    if (System.getProperty("idea.version") == null) {
        jmhAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.37'
    }

@bbakerman

Copy link
Copy Markdown
Member

I also get

Groovyc: Internal groovyc error: code 1

when I compile with

Capto_Capture 2025-08-07_06-32-34_pm

@bbakerman

Copy link
Copy Markdown
Member

but if I changed it to

Capto_Capture 2025-08-07_06-35-32_pm

and also put in

jmhAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.37'

then I get the JMH to run inside IDEA without error

I think the days of being able to compile via "IDEA" are over. We have reached a complication point where in order to do ALL thing things (compile + grammar generation + groovy tests + jmh running) we need to build using gradle.

My view is we should put in the annotation processor BUT lose the ability to compile via IDEA

@andimarek

andimarek commented Aug 7, 2025

Copy link
Copy Markdown
Member Author

@bbakerman @dfa1 you need to increate the compiler memory setting ("Shared heap size") to something higher than the default:

Screenshot 2025-08-07 at 7 15 41 pm

This will solve your compile errors and will make it quite fast ... much faster than build with gradle

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants