Skip to content

Conversation

IdrissRio
Copy link
Contributor

@IdrissRio IdrissRio commented Jul 23, 2025

This PR adds support to compact source files (JEP 512).
It adds 2 new predicates Class.isImplicit and CompilationUnit.isCompactedSourceFile.

See internal PR for more info.

@IdrissRio IdrissRio added depends on internal PR This PR should only be merged in sync with an internal Semmle PR and removed documentation labels Jul 23, 2025
@IdrissRio IdrissRio force-pushed the idrissrio/compact-soruce-file branch from 05f6811 to 66b5755 Compare July 23, 2025 13:27
@IdrissRio IdrissRio force-pushed the idrissrio/compact-soruce-file branch 3 times, most recently from 6aac6ea to 246bbd4 Compare July 24, 2025 10:41
@IdrissRio IdrissRio force-pushed the idrissrio/compact-soruce-file branch 3 times, most recently from a5c64a6 to c9885d5 Compare July 28, 2025 14:50
@IdrissRio IdrissRio changed the base branch from main to idrissrio/java-dca-fix July 29, 2025 07:28
@IdrissRio IdrissRio force-pushed the idrissrio/java-dca-fix branch from 56cd9e7 to ac52a1b Compare July 29, 2025 07:45
Base automatically changed from idrissrio/java-dca-fix to main July 29, 2025 14:32
@IdrissRio IdrissRio force-pushed the idrissrio/compact-soruce-file branch 2 times, most recently from 7e04c2b to 5a80595 Compare July 29, 2025 15:31
@IdrissRio IdrissRio marked this pull request as ready for review July 30, 2025 06:46
@Copilot Copilot AI review requested due to automatic review settings July 30, 2025 06:46
@IdrissRio IdrissRio requested a review from a team as a code owner July 30, 2025 06:46
Copy link
Contributor

@Copilot Copilot AI left a 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 isImplicitClass table
  • 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 IdrissRio force-pushed the idrissrio/compact-soruce-file branch from 5a80595 to cd80877 Compare August 19, 2025 10:38
@IdrissRio IdrissRio requested a review from a team as a code owner August 19, 2025 10:38
@IdrissRio IdrissRio changed the base branch from main to idrissrio/java-upgrade-fix August 19, 2025 12:05
@github-actions github-actions bot removed the Kotlin label Aug 19, 2025
@IdrissRio IdrissRio force-pushed the idrissrio/compact-soruce-file branch from 10d4160 to 6633952 Compare August 21, 2025 08:02
@IdrissRio IdrissRio force-pushed the idrissrio/compact-soruce-file branch 2 times, most recently from e0b9549 to 6247034 Compare August 21, 2025 14:15
geoffw0
geoffw0 previously approved these changes Aug 21, 2025
Copy link
Contributor

@geoffw0 geoffw0 left a 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).

@IdrissRio IdrissRio force-pushed the idrissrio/java-upgrade-fix branch from ba93ced to 564364b Compare August 25, 2025 09:34
@IdrissRio IdrissRio force-pushed the idrissrio/java-upgrade-fix branch from 564364b to a34b362 Compare August 27, 2025 16:14
@IdrissRio IdrissRio force-pushed the idrissrio/compact-soruce-file branch from 6247034 to cc48fdf Compare August 29, 2025 07:56
@IdrissRio IdrissRio force-pushed the idrissrio/java-upgrade-fix branch from a34b362 to 5d2268f Compare September 2, 2025 18:19
Base automatically changed from idrissrio/java-upgrade-fix to main September 4, 2025 14:46
@IdrissRio IdrissRio dismissed geoffw0’s stale review September 4, 2025 14:46

The base branch was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends on internal PR This PR should only be merged in sync with an internal Semmle PR documentation Java
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants