-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
fix: prevent multiple, duplicate build-system entries #1355
fix: prevent multiple, duplicate build-system entries #1355
Conversation
Signed-off-by: Jeremy Long <[email protected]>
so you propose to add the setting only, if no build system was present? have you thought about the alternatives? Therefore, I'll mark this PR as "draft" fdor now |
Sorry - I always assume code is easier to use as a discussion point. This PR is using the same check as is already being done for VCS so I didn't think there would be a concern. |
exactly. and i fond this debatable.
|
Instead of overriding an existing value, the code should not add duplicate entries. See the proposal above. |
and exactly this thing is debatable. see #1355 (comment) I mean, the original code came from you, now you've changed your mind about the implementation, or did no think it trough in the first place. I am tending to tell you, that you should manage your manifest properly, to solve your use case, instead of changing code. |
Reminder for self: regardless whether the BuildSystem implementation becomes an "override" or a "conditional", this change would be a breaking change. |
I think you are conflating the VCS and Build-System. The build-system only originates from the The only thing I didn't think through is that the call to |
I'd prefer this not to be a breaking change - and just not add duplicate entries. |
you are right; i was wrong. |
could you provide a reproducible test, that causes multiple BuildSystem entries, and after fixing the bug there is just one? |
@jkowalleck I've been trying to figure out how to easily create a reproducible test for the problem I've encountered. Unfortunately, the only thing I've been able to come up with will be complicated. It would require installing a ServiceNow CLI, configuring the CLI to work with a Now instance, etc. If you are really going to require a reproducer it will likely take a LOT of work - when the fix is to just prevent the addition of the exact same build-system URL. I'd suggest merging my suggestion above and squash and merge the PR. However, I do understand wanting processes to be followed around reproducers to prevent regressions, etc. Thoughts? |
agree. Lets merge this in. Tomorrow I'm on a long train journey, so I might have time to create a regression test for this case ;-) |
fix was released via https://github.com/CycloneDX/cyclonedx-webpack-plugin/releases/tag/v4.0.1 |
Thank you! |
followup of #1355 Signed-off-by: Jan Kowalleck <[email protected]>
PR #1349, for some projects, ends up creating multiple duplicate
build-system
external references. The fix is to ensure we have not already added an external reference of type:build-system
.With the current implementation, I've seen the plugin produce records like:
fixes #1356