Repository navigation
java: a source package named build is parsed; only a Gradle build's output is skipped (#1545) - #1625
Merged
Merged
Conversation
…utput is skipped The Java source walk pruned every directory named `build` by name (EXCLUDED_DIRS), so a real package such as src/main/java/app/build was never parsed and every call into it was unresolved. Case 62 carried the gap in its blessed .edges golden; only CI's bytecode oracle saw the two missing StepBuilder edges. A `build` directory is now skipped by the Java walk only when it is a Gradle project's or module's output: a `build` beside build.gradle(.kts) or settings.gradle(.kts), anchored on its owner the way `target` is anchored on a pom.xml (utils/generated-output.ts isGradleBuildOutput). The refresher's file table (ax_fresh.py) applies the same rule, so freshness and the language count agree with the parser. Case 62 now resolves both StepBuilder edges (.edges, .type-use re-blessed, .oracle added); case 63 gets its missing .oracle golden; new case 64 is a Gradle project with a root and a module build/generated source (skipped) and a `build` package in each (read).
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 28, 2026 08:51
swapnilpaliwal-sd
added a commit
that referenced
this pull request
Sep 28, 2026
swapnilpaliwal-sd
added a commit
that referenced
this pull request
Sep 28, 2026
This was referenced Sep 28, 2026
Merged
swapnilpaliwal-sd
added a commit
that referenced
this pull request
Sep 28, 2026
The vendored parser keeps its own version and moves once per release, only when parser code changed. dev and main ship it at 0.1.1. On 0.1.4, four merged changes touched parser/: #1592 (a concise arrow body is owned by the arrow), #1616 (generated-output detection), #1621 (a package's published API is rooted from package.json) and #1625 (the Java walk and build directories). So 0.1.2, one bump for the release. (cherry picked from commit 51c5e8e) Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
added a commit
that referenced
this pull request
Sep 28, 2026
The vendored parser keeps its own version and moves once per release, only when parser code changed. dev and main ship it at 0.1.1. On 0.1.4, four merged changes touched parser/: #1592 (a concise arrow body is owned by the arrow), #1616 (generated-output detection), #1621 (a package's published API is rooted from package.json) and #1625 (the Java walk and build directories). So 0.1.2, one bump for the release. (cherry picked from commit 51c5e8e) Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
This was referenced Sep 28, 2026
qtwang
pushed a commit
to qtwang/axiomcodegraph
that referenced
this pull request
Oct 11, 2026
The vendored parser keeps its own version and moves once per release, only when parser code changed. dev and main ship it at 0.1.1. On 0.1.4, four merged changes touched parser/: AxiomCodeAI#1592 (a concise arrow body is owned by the arrow), AxiomCodeAI#1616 (generated-output detection), AxiomCodeAI#1621 (a package's published API is rooted from package.json) and AxiomCodeAI#1625 (the Java walk and build directories). So 0.1.2, one bump for the release.
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.
Refs #1545
What was wrong
The Java source walk (
parser/src/workflows/java/java-project-analyzer.ts) skipped every directory namedbuildby name, through the sharedEXCLUDED_DIRS.buildis also an ordinary Java package name (builders, build steps), sosrc/main/java/app/build/StepBuilder.javawas never parsed, calls into it were unresolved, and no skipped-file row said so. Case 62 (from #1616) carried the gap in its locally blessed.edgesgolden; only CI's bytecode oracle saw it:This fails
engine (java)on every PR against 0.1.4.The change
utils/generated-output.ts:isGradleBuildOutput(parent, name). Abuilddirectory is a build's output only when abuild.gradle,build.gradle.kts,settings.gradleorsettings.gradle.ktssits beside it (the root of a Gradle project or module). Anchored on its owner, the waytargetis anchored on apom.xml.buildonly when that holds. Abuildinside a source tree or package path is walked.EXCLUDED_DIRSitself is unchanged, so the XML, YAML, properties and Gradle walks behave as before.ax_fresh.py:buildleaves the Java prune set, andgradle_outputprunes a Gradlebuild/for Java, so the file table, freshness and the language count match the parser.tests/freshness.pychecks both halves.build/and only the setuptools output shapes inside it (python-project-analyzer.tscollectRootBuildFiles); a nestedbuildpackage is already read.Tests
known_edge(.edges,.type-usere-blessed);.oracleadded:oracle=4 engine=4 agree=4 missing=0..oracleadded (oracle=1 engine=1 agree=1).gradle-build-output-is-not-source: a Gradle root project plus a module, each with generated.javaunderbuild/generated/...beside its build script (must be skipped) and a source package namedbuild(must be read). Its.oracle:oracle=4 engine=4 agree=4 missing=0. Control, checked both ways: with the build scripts present the IR names neither generated class; with them removed, 3 IR files name them.expected/oracle-agreement.txt: 48 to 49 compared cases (case 64)..oraclefiles come frombytecode_oracle.py(javac + javap) here; CI's JDK 24 run is the check.tests/freshness.py: 24 of 24.No
.known-missingentries were added.Parser version
This changes parser code.
parser/package.jsonon 0.1.4 is 0.1.1, the same as main; #1616 changed parser code without bumping it. Per the protocol the parser version moves once per release (done by the release commit), so this PR does not bump it. It is the second parser change on 0.1.4 that the release needs to count.Deep scan deferred.