fix: prevent component duplication#1456
Conversation
Previously, disabling root component auto-detection while specifying a root component left the auto-detected root in the BOM, with dependencies still attached to it (issue #1418). This change ensures that all instances of the auto-detected root are replaced by the user-provided component using a `componentSubstitutionMap` during component generation. Regression tests were added for that particular case Signed-off-by: Maxim Bagryantsev <maxbag97619@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the generateComponents method to return unique components per package instead of returning duplicate components for each module. The key changes eliminate redundancy in the component output while maintaining correct dependency linking.
- Simplified type annotation for the
pkgsrecord - Changed return value to deduplicate components by package path
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
21258b7 to
ca445a2
Compare
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
3fa1634 to
69b01fb
Compare
69b01fb to
16d55e4
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.