Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tjugdev
Copy link
Contributor

@tjugdev tjugdev commented Oct 10, 2025

Overview

The graph of a cargo project incorrectly reported workspace member packages as dependencies when they are not really dependencies so much as what is being scanned.

From a UI perspective, this was actually fixed by #1599 since the workspace members are all path dependencies and so get filtered already. But the project graph was still technically incorrect so this resolves that.

Acceptance criteria

Packages defined in a Cargo workspace are not reported as dependencies.

Testing plan

  • Clone the test project and check out commit 164eae5e76cc3b17bd9d59f647e62b5b9b10785c. Run fossa analyze and confirm that generated graph is empty in the output json and that no dependencies are displayed in the UI.
  • Clone sparkle and run an analyze. Check the generated graph's deps and confirm that none of the packages defined in the repo are present as dependencies.
  • Unit tests updated to catch this bug. It was being masked by a call to pruneUnreachable which we can now remove.

Risks

Metrics

References

  • ANE-512 Cargo analyzer reports library project as dependency of itself

Checklist

  • I added tests for this PR's change (or explained in the PR description why tests don't make sense).
  • If this PR introduced a user-visible change, I added documentation into docs/.
  • If this PR added docs, I added links as appropriate to the user manual's ToC in docs/README.ms and gave consideration to how discoverable or not my documentation is.
  • If this change is externally visible, I updated Changelog.md. If this PR did not mark a release, I added my changes into an ## Unreleased section at the top.
  • If I made changes to .fossa.yml or fossa-deps.{json.yml}, I updated docs/references/files/*.schema.json AND I have updated example files used by fossa init command. You may also need to update these if you have added/removed new dependency type (e.g. pip) or analysis target type (e.g. poetry).
  • If I made changes to a subcommand's options, I updated docs/references/subcommands/<subcommand>.md.

@tjugdev tjugdev requested a review from a team as a code owner October 10, 2025 21:10
@tjugdev tjugdev requested a review from spatten October 10, 2025 21:10
Copy link
Contributor

@spatten spatten left a comment

Choose a reason for hiding this comment

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

looks great! Thank you for the detailed test plan; running through that helped me understand what the problem was and how this PR solved it

@tjugdev tjugdev merged commit b982a9b into master Oct 14, 2025
22 of 23 checks passed
@tjugdev tjugdev deleted the fix-cargo-dep-on-self branch October 14, 2025 22:26
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.

2 participants