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

chore: break assumption that syft cpe.CPE is wfn.Attributes #1675

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

willmurphyscode
Copy link
Contributor

Previously, Syft's cpe.CPE type was an alias for wfn.Attributes. Fix a couple places where Grype's compilation depended on that fact, since it will stop being true in the next Syft release.

See anchore/syft#2529

Previously, Syft's cpe.CPE type was an alias for wfn.Attributes. Fix a
couple places where Grype's compilation depended on that fact, since it
will stop being true in the next Syft release.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
@willmurphyscode
Copy link
Contributor Author

Note that this code probably can't be merged until the next Syft is out, because of this linter failure:

grype/cpe/cpe.go:26:21: unnecessary conversion (unconvert)
	a := wfn.Attributes(c)
	                   ^
grype/cpe/cpe.go:28:28: unnecessary conversion (unconvert)
		canCopy := wfn.Attributes(candidate)
		                         ^
make: *** [lint] Error 1

I'm leaving this as a draft PR whose commit should be pulled into the next PR that will bump Syft in Grype, to fix a couple small compile-time errors.

Signed-off-by: Will Murphy <will.murphy@anchore.com>
@wagoodman wagoodman marked this pull request as ready for review January 25, 2024 14:10
@wagoodman wagoodman enabled auto-merge (squash) January 25, 2024 14:11
@wagoodman wagoodman merged commit 73cb5f6 into main Jan 25, 2024
10 checks passed
@wagoodman wagoodman deleted the chore/use-new-syft-cpe branch January 25, 2024 14:24
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.

None yet

2 participants