Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency imports should always be fetched from upstream #1027

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

cuixq
Copy link
Contributor

@cuixq cuixq commented Jun 5, 2024

There are two places that we call mergeParents():

  • Merging data from parent pom.xml files
  • Importing dependency management from another project

In mergeParents(), we first check if relativePath is defined to know if we can parse parent locally.
However, this only applies for the first case but not for importing dependency management.
Also, once we start fetching parent pom.xml from upstream, we should no longer parse locally.

This PR adds allowLocal to mergeParents() to specify if we allow parsing local parent pom.xml, and once a parent is fetched from upstream, allowLocal is set to false.

@codecov-commenter
Copy link

codecov-commenter commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.17%. Comparing base (f2a30a8) to head (cf8acae).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1027      +/-   ##
==========================================
+ Coverage   65.04%   65.17%   +0.13%     
==========================================
  Files         149      149              
  Lines       12252    12342      +90     
==========================================
+ Hits         7969     8044      +75     
- Misses       3835     3847      +12     
- Partials      448      451       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@another-rex another-rex left a comment

Choose a reason for hiding this comment

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

LGTM

internal/resolution/manifest/maven.go Outdated Show resolved Hide resolved
@cuixq cuixq merged commit 02a802d into google:main Jun 6, 2024
13 checks passed
@cuixq cuixq deleted the allow-local branch June 6, 2024 04:02
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