Skip to content
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

Java: Clarify supported language features #18409

Merged
merged 2 commits into from
Jan 7, 2025
Merged

Conversation

igfoo
Copy link
Contributor

@igfoo igfoo commented Jan 6, 2025

No description provided.

@Copilot Copilot bot review requested due to automatic review settings January 6, 2025 12:29

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • docs/codeql/reusables/supported-versions-compilers.rst: Language not supported

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@igfoo igfoo requested a review from a team January 6, 2025 12:30
@igfoo igfoo changed the title Java: Clarify supported langauge features Java: Clarify supported language features Jan 6, 2025
@smowton
Copy link
Contributor

smowton commented Jan 6, 2025

Will this be confusing re the difference between 7-22 (JVM versions that can execute the agent) vs 8-22 (versions whose language features we claim to support)? Strictly speaking that's true-- -source < 8 is silently treated as source 8 these days due to javac 22 having dropped the codepaths for the small number of scenarios where -source 7 programs are not forward-compatible with -source 8 -- but the vast majority of Java 1-1.7 programs are correctly understood, so perhaps we should just say "up to 22" at this granularity, only getting into the Java <= 7 issues in some higher-detailed doc, if ever (I don't believe we ever documented silently treating -source 1.6 as -source 7, for example).

@igfoo
Copy link
Contributor Author

igfoo commented Jan 6, 2025

I considered that, but it would be a bit awkward if we got a bug report referencing our version claims from someone with a Java 7 class we analyse incorrectly.

I think it's OK to be precise in a footnote on a page that most people won't read carefully anyway.

@smowton
Copy link
Contributor

smowton commented Jan 6, 2025

We'll still get confused complaints from people asking if their -source 7 code is going to be rejected or what. How about adding "Older Java language versions are analysed as Java 8".

@igfoo igfoo merged commit b18230a into github:main Jan 7, 2025
5 of 6 checks passed
@igfoo igfoo deleted the igfoo/supJ branch January 7, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants