-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Java: Add support to Compact Source Files #20116
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
Conversation
05f6811 to
66b5755
Compare
6aac6ea to
246bbd4
Compare
java/downgrades/9f6026c400996c13842974b24f076a486ad1f69c/compilationUnit.ql
Fixed
Show fixed
Hide fixed
a5c64a6 to
c9885d5
Compare
56cd9e7 to
ac52a1b
Compare
7e04c2b to
5a80595
Compare
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.
Pull Request Overview
This PR adds support for Java 25 compact source files (JEP 512) by introducing two new predicates: Class.isImplicit() to identify implicitly declared classes and CompilationUnit.isCompactSourceFile() to identify compilation units containing compact source files.
- Added database schema support with new
isImplicitClasstable - Implemented library predicates for detecting compact source files and implicit classes
- Created comprehensive test suite with multiple query examples
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| java/ql/lib/config/semmlecode.dbscheme | Added isImplicitClass table definition for tracking implicit classes |
| java/ql/lib/semmle/code/java/Type.qll | Added Class.isImplicit() predicate to detect implicit classes |
| java/ql/lib/semmle/code/java/CompilationUnit.qll | Added CompilationUnit.isCompactSourceFile() predicate |
| java/ql/lib/upgrades/*/semmlecode.dbscheme | Database upgrade schema adding isImplicitClass table |
| java/ql/lib/upgrades/*/old.dbscheme | Previous database schema for comparison |
| java/downgrades/*/semmlecode.dbscheme | Database downgrade schema removing isImplicitClass table |
| java/downgrades/*/old.dbscheme | Previous schema for downgrade comparison |
| java/ql/test/library-tests/compact-source-files/* | Test files demonstrating compact source file functionality |
| java/ql/lib/change-notes/2025-07-23-compact-source-files.md | Release notes documenting the new feature |
5a80595 to
cd80877
Compare
10d4160 to
6633952
Compare
e0b9549 to
6247034
Compare
geoffw0
left a comment
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.
LGTM (when the internal PR is approved as well).
564364b to
a34b362
Compare
6247034 to
cc48fdf
Compare
a34b362 to
5d2268f
Compare
cc48fdf to
fc1b927
Compare
This PR adds support to compact source files (JEP 512).
It adds 2 new predicates
Class.isImplicitandCompilationUnit.isCompactedSourceFile.See internal PR for more info.