Skip to content

refactor: Use manifest declarations for Maven checks - #12

Open
andrew wants to merge 2 commits into
chains-project:mainfrom
andrew:use-manifest-declarations
Open

refactor: Use manifest declarations for Maven checks#12
andrew wants to merge 2 commits into
chains-project:mainfrom
andrew:use-manifest-declarations

Conversation

@andrew

@andrew andrew commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Replace the custom POM parser and Maven Central client with declaration parsing from git-pkgs/manifests, the shared pin comparison path, and the injected enrichment resolver.

This follows git-pkgs/manifests#48 and builds on:

The branch pins the manifests PR commit as a Go pseudo-version. Replace it with the next tagged manifests release before marking this ready.

Against main, the local arm64 binary grew from 11.32 MB to 11.43 MB. A 100-run no-op process benchmark moved from 6.84 ms to 7.43 ms per invocation.

@algomaster99 algomaster99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! I see your manifest parser is nicer because of defaults such as org.apache.maven.plguins. I know it is in progress but we can merge when 56ea5fbc41be is in main.

Dropped a few nitpicks to minimize diff 😅

Comment thread pkg/maven/pom_test.go Outdated
Comment thread pkg/maven/pom_test.go Outdated
@andrew
andrew marked this pull request as ready for review August 15, 2026 16:58
@andrew
andrew force-pushed the use-manifest-declarations branch from c42ad84 to 905407a Compare August 15, 2026 17:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the Maven pom.xml checker to rely on git-pkgs/manifests declarations plus the shared pins diffing pipeline and an injected resolver.Resolver, removing the bespoke POM parser and Maven Central HTTP client.

Changes:

  • Replace custom POM parsing and Maven Central metadata fetching with manifests.Parse + pins.Diff + injected resolver wiring.
  • Update Maven unit tests to validate declaration extraction (including skipping property refs and handling exact range syntax) and to use a fake resolver.
  • Wire the shared resolver into the Maven checker in main.go, and bump related Go module dependencies.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/maven/pom.go Switch Maven checking to manifests declarations + shared pins diff + injected resolver.
pkg/maven/pom_test.go Update tests for new declaration-based parsing and resolver injection.
pkg/maven/maven.go Remove bespoke Maven Central HTTP resolver implementation.
main.go Inject shared resolver into Maven checker.
main_test.go Add test ensuring Maven checker receives the shared resolver.
go.mod Bump git-pkgs/manifests and related deps.
go.sum Update checksums for bumped dependencies.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pkg/maven/pom.go
Comment thread go.mod
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@algomaster99 algomaster99 changed the title Use manifest declarations for Maven checks refactor: Use manifest declarations for Maven checks Aug 15, 2026
@algomaster99

Copy link
Copy Markdown
Member

@andrew ready to merge?

@andrew

andrew commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants