-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
detekt 1.22.0: Add --add-opens java.base/java.lang=ALL-UNNAMED for openjdk@17 #116785
Conversation
- With the upgrade from openjdk@11 to openjdk@17 the formula breaks when running detekt - See Homebrew#116784
Is there no upstream patch for this yet? |
Unfortunately not and this error was introduced to the Formular in https://github.com/Homebrew/homebrew-core/blame/04c92a907a3c0a1cefa2e22aeee8a39cae9d47f6/Formula/detekt.rb#L17 when upgrading the JDK |
Is there an upstream issue we can reference to know when we can remove this workaround? |
It was discovered here detekt/detekt#5247 (comment) most similar upstream issue pinterest/ktlint#1618 however this fix reduces the chance of the Formular / tool breaking in the future to to similar upstream changes |
This comment there has me a bit worried. It might hide the symptoms if we merge this PR. But does it really fix anything? |
Yes 👍🏼 it makes the installed tool usable again. |
That comment was from me. There's nothing we can change in detekt itself to fix this. All I meant by that comment was that the generated scripts used by detekt itself don't currently include that flag, but should, so it's fixed for other users who are using the CLI distribution of detekt. I'd suggest actually changing the homebrew script to download the ZIP (e.g. detekt-cli-1.22.0.zip), then call |
Actually it might be possible to fix this for the JAR as well by adding an appropriate Regardless of how we manage this in detekt itself though, this workaround is required in the formula file to make v1.22.0 work in brew. The workaround might not be required for future versions, you can track this for updates: detekt/detekt#5576 |
Co-authored-by: Sean Molenaar <[email protected]>
Co-authored-by: Sean Molenaar <[email protected]>
🤖 A scheduled task has triggered a merge. |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?