-
-
Notifications
You must be signed in to change notification settings - Fork 187
fix: add Java 25 as minimum JVM version when using compact source files #2143
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
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not symmetric fix - what if user chose a different java version?
the logic here is that if you run init with Java 25+ wehter available or chosen we generate for that - if anything it should generate //JAVA but its not something we can do reliably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But isn't it true that it should be at least Java 25? Otherwise it just won't work, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without
//JAVA 25+the generated code does not run on a system with a default JVM of version 24 or less.If a JVM of version for example 26 is installed, then it will be used to run the script because it matches the JAVA specification of
25+.Maybe not a perfect solution, but it is better than not having
//JAVA 25+.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also works on java22 with preview flags.
I'm just saying we also don't add java 17 when deps require java 17... Should we ?
I'm not super against it but just saying until now we haven't explicitly added //JAVA unless explicitly user asking for it.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to abide by what you decide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
compactSourceFilesis onlytruefor Java 25+Do we have templates that use deps that require Java 17? Then I would say yes we should. But only if we have templates where we have explicitly added those deps. I'm not suggesting we should do any detection or anything. Only straightforward things like have templates or examples where we know the minimum version required.
Until now we haven't used any special Java features in our templates, haven't we? In some of our examples we do, but AFAIK those have //JAVA lines.