feat(cross-repo): link Maven library dependencies#442
Open
nvt-pankajsharma wants to merge 6 commits into
Open
Conversation
7dbddb6 to
911c01c
Compare
c9002a5 to
7abffbb
Compare
Owner
|
Heads-up: this project now validates every PR automatically — tests, lint, security/license gates, and DCO sign-off (CONTRIBUTING.md). Your branch predates this, so CI will flag the missing |
Signed-off-by: Pankaj Sharma <192576993+nvt-pankajsharma@users.noreply.github.com>
Signed-off-by: Pankaj Sharma <192576993+nvt-pankajsharma@users.noreply.github.com>
Signed-off-by: Pankaj Sharma <192576993+nvt-pankajsharma@users.noreply.github.com>
Signed-off-by: Pankaj Sharma <192576993+nvt-pankajsharma@users.noreply.github.com>
Signed-off-by: Pankaj Sharma <192576993+nvt-pankajsharma@users.noreply.github.com>
31ad309 to
12141b4
Compare
Signed-off-by: Pankaj Sharma <192576993+nvt-pankajsharma@users.noreply.github.com>
12141b4 to
a8d6039
Compare
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.
Summary
Fixes #440
Adds Maven artifact dependency matching to
cross-repo-intelligenceso independently indexed repos can expose shared-library usage, not only HTTP/async/channel relationships.This PR adds:
src/pipeline/pass_cross_repo_maven.[h]for Maven-specific cross-repo matchingCROSS_LIBRARY_DEPENDS_ONedges in the consumer/source projectCROSS_LIBRARY_USED_BYedges in the provider/target projectcross_library_edgesCROSS_LIBRARY_*edge typesScope
This is intentionally scoped to direct Maven
pom.xmlartifact dependency relationships. Gradle, npm, Go modules, Python packages, and source import-to-artifact resolution should be follow-up issues.Maven plugin classpath dependencies are intentionally not treated as service/library usage. Maven
<exclusion>entries are also intentionally ignored because they describe libraries excluded from transitive resolution, not libraries used by the consuming project.TDD record
cross_repo_maven_dependency_creates_library_edgescross-repo-intelligence; later tightened to prove Maven exclusions do not count as library usage.cross_repo_maven_dependency_escapes_library_edge_propscross_repo_maven_dependency_management_does_not_create_library_edgecross_repo_maven_commented_dependency_does_not_create_library_edgecross_repo_maven_plugin_dependency_does_not_create_library_edgecross_repo_maven_cleanup_preserves_unrelated_nodescross_repo_maven_provider_rerun_preserves_incoming_used_byCROSS_LIBRARY_USED_BYlinks.cross_repo_maven_removed_dependency_clears_provider_used_byCROSS_LIBRARY_USED_BYlinks.cross_repo_maven_long_coordinates_do_not_collidecross_repo_maven_fixture_restores_cache_dirCBM_CACHE_DIRwithout restoring it for later tests.cross_repo_maven_long_references_do_not_collidecross_repo_maven_very_long_pom_paths_do_not_truncateLibrarynode.cross_repo_maven_failed_growth_preserves_capacitycross_repo_maven_growth_rejects_byte_overflow_before_reallocreallocand record a larger capacity.cross_repo_project_list_initial_alloc_failure_returns_emptyReview-fix-loop evidence
Allocation and bounded-growth sweep:
Generated identity and cleanup sweep:
LibraryandLibraryConsumernode qualified names, source-side cleanup, provider-side reverse cleanup.Librarynodes and outgoingCROSS_LIBRARY_DEPENDS_ON; reverseCROSS_LIBRARY_USED_BYcleanup is scoped to the source project that created it.False-positive sweep:
Verification
make -f Makefile.cbm testpassed with5619 passed.make -f Makefile.cbm lint-format CLANG_FORMAT="$(brew --prefix clang-format)/bin/clang-format"passed locally.scripts/check-dco.sh origin/main..HEADpassed locally for all six PR commits.git diff --check origin/main...HEADpassed locally.