Java: Add support to Compact Source Files - #20116
Merged
Merged
Conversation
IdrissRio
force-pushed
the
idrissrio/compact-soruce-file
branch
from
July 23, 2025 13:27
05f6811 to
66b5755
Compare
IdrissRio
force-pushed
the
idrissrio/compact-soruce-file
branch
3 times, most recently
from
July 24, 2025 10:41
6aac6ea to
246bbd4
Compare
IdrissRio
force-pushed
the
idrissrio/compact-soruce-file
branch
3 times, most recently
from
July 28, 2025 14:50
a5c64a6 to
c9885d5
Compare
IdrissRio
force-pushed
the
idrissrio/java-dca-fix
branch
from
July 29, 2025 07:45
56cd9e7 to
ac52a1b
Compare
IdrissRio
force-pushed
the
idrissrio/compact-soruce-file
branch
2 times, most recently
from
July 29, 2025 15:31
7e04c2b to
5a80595
Compare
IdrissRio
marked this pull request as ready for review
July 30, 2025 06:46
Contributor
There was a problem hiding this comment.
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 |
IdrissRio
force-pushed
the
idrissrio/compact-soruce-file
branch
from
August 19, 2025 10:38
5a80595 to
cd80877
Compare
jketema
reviewed
Aug 20, 2025
geoffw0
reviewed
Aug 20, 2025
IdrissRio
force-pushed
the
idrissrio/compact-soruce-file
branch
from
August 21, 2025 08:02
10d4160 to
6633952
Compare
IdrissRio
force-pushed
the
idrissrio/compact-soruce-file
branch
2 times, most recently
from
August 21, 2025 14:15
e0b9549 to
6247034
Compare
geoffw0
previously approved these changes
Aug 21, 2025
geoffw0
left a comment
Contributor
There was a problem hiding this comment.
LGTM (when the internal PR is approved as well).
IdrissRio
force-pushed
the
idrissrio/java-upgrade-fix
branch
2 times, most recently
from
August 27, 2025 16:14
564364b to
a34b362
Compare
IdrissRio
force-pushed
the
idrissrio/compact-soruce-file
branch
from
August 29, 2025 07:56
6247034 to
cc48fdf
Compare
IdrissRio
force-pushed
the
idrissrio/java-upgrade-fix
branch
from
September 2, 2025 18:19
a34b362 to
5d2268f
Compare
IdrissRio
force-pushed
the
idrissrio/compact-soruce-file
branch
from
September 5, 2025 08:19
cc48fdf to
fc1b927
Compare
esteffin
approved these changes
Sep 5, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds support to compact source files (JEP 512).
It adds 2 new predicates
Class.isImplicitandCompilationUnit.isCompactedSourceFile.See internal PR for more info.