GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Wire ModelBuilderRequest.isLocationTracking() to XML parser by gnodet · Pull Request #12655 · apache/maven Conversation
Contributor
Summary
Previously, Test plan
🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
gnodet
added a commit
that referenced
this pull request
Remove addLocationInformation from XmlReaderRequest and DefaultModelXmlFactory — these changes belong in the wire-location-tracking-to-parser branch (PR #12655), not in the model-building-pipeline optimization PR. Co-Authored-By: Claude Opus 4.6 <[email protected]>
gnodet
added a commit
that referenced
this pull request
Remove addLocationInformation from XmlReaderRequest and DefaultModelXmlFactory — these changes belong in the wire-location-tracking-to-parser branch (PR #12655), not in the model-building-pipeline optimization PR. Co-Authored-By: Claude Opus 4.6 <[email protected]> Add isAddLocationInformation() to XmlReaderRequest and wire it to MavenStaxReader so callers can skip location tracking when not needed. DefaultModelBuilder propagates the flag from ModelBuilderRequest to the XML parser, and forwards the parent's setting to BOM import sub-requests instead of hardcoding it off. Co-Authored-By: Claude Opus 4.6 <[email protected]>
gnodet
force-pushed
the
quick-fix/wire-location-tracking-to-parser
branch
from
2190df7 to
43f6a73
Compare
Do not pass ModelBuilderRequest.isLocationTracking() as the
addLocationInformation flag for XmlReaderRequest. These are
different concerns:
- isLocationTracking() controls whether the model building pipeline
retains location data (used by DefaultDependencyManagementImporter
and DefaultProjectBuilder)
- isAddLocationInformation() controls whether the XML parser tracks
line/column positions during parsing
Wiring one to the other broke hasSubprojectsDefined(), which relies on
model.getLocation("modules") to detect <modules> presence. When
DefaultConsumerPomBuilder sets locationTracking(false) for consumer POM
generation, the XML parser skipped location tracking, causing spurious
auto-discovery of subprojects alongside explicit <modules> entries.
The XmlReaderRequest API + DefaultModelXmlFactory wiring remain as
correct infrastructure for future selective optimization by callers
who know they don't need XML-level locations.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
gnodet
marked this pull request as ready for review
gnodet
commented
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new Two observations:
Note: Cannot submit as APPROVE because the PR author matches the review account. This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying. Claude Code on behalf of gnodet
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…sed opt-out
Replace the fragile location-tracking-based detection of empty <modules/>
elements with a simple non-empty list check, and add a new user property
(maven.project.discoverSubprojects) as the explicit opt-out mechanism for
subproject auto-discovery.
The previous approach relied on model.getLocation("modules") != null to
distinguish "no <modules> element" from "empty <modules/> element", which
broke whenever location tracking was disabled (e.g. by
DefaultConsumerPomBuilder). The new approach:
- hasSubprojectsDefined() now checks !getSubprojects().isEmpty() ||
!getModules().isEmpty()
- Users who want to suppress auto-discovery without listing subprojects
can set -Dmaven.project.discoverSubprojects=false
- ModelBuilderRequest.locationTracking default reverted to false since
subproject detection no longer depends on it
Co-Authored-By: Claude Opus 4.6 <[email protected]>
gnodet
commented
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM ✅ — Re-reviewed after new commits. Both previous findings are resolved. Previous findings status:
New changes look good:
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying. Claude Code on behalf of gnodet
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
gnodet
commented
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Review: Wire ModelBuilderRequest.isLocationTracking() to XML parser The code itself is correct and well-tested. Two medium-severity observations about documentation and behavioral changes: Confirmed findings:
This review was generated by an AI agent (Claude Code) and may contain inaccuracies. Please verify all suggestions before applying. Claude Code on behalf of Guillaume Nodet
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
gnodet
added a commit
to gnodet/maven
that referenced
this pull request
gnodet
commented
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Review — correct code, but PR title/description need updating The code changes are well-tested and correct. The primary net effect is replacing fragile location-tracking-based detection of empty Items to address🟡 Behavioral change needs documentation (medium) — Users who relied on empty 🟡 PR title/description mismatch (medium) — The title describes commit 1 ("Wire ModelBuilderRequest.isLocationTracking() to XML parser") which was reverted in commit 2. The actual net change is the subproject discovery behavioral change from commit 3. Consider updating the title and description to reflect the final state. Minor observations
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying. Claude Code on behalf of Guillaume Nodet
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
elharo
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
This was referenced
gnodet
added a commit
that referenced
this pull request
Co-Authored-By: Claude Opus 4.6 <[email protected]>
gnodet
added a commit
that referenced
this pull request
…12905) Co-authored-by: Claude Opus 4.6 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesLabels
enhancement
ProjectsDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |