Skip to content

Conversation

@aiuto
Copy link
Collaborator

@aiuto aiuto commented Jul 18, 2025

This will make it easier for users (esp. bzlmod extensions integrating with package managers) to generate package_metadata targets.

Based on #14

Yannic and others added 22 commits April 30, 2025 22:05
This will make it easier for users (esp. bzlmod extensions integrating with package managers) to generate `package_metadata` targets.
Instead of having to write `purl = "pkg:bazel/{}@{}".format(module_name(), module_version()) if module_version() else "pkg:bazel/{}".format(module_name())` everywhere to construct a `purl`, users can now write `purl = purl.bazel(module_name(), module_version())` and it'll automatically do the right thing.
Co-authored-by: Yannic <[email protected]>
@aiuto aiuto requested a review from Yannic July 18, 2025 02:59
@aiuto
Copy link
Collaborator Author

aiuto commented Jul 18, 2025

@Yannic By just writing the strings I eliminated the need for the json encoding. Now it passes in bazel7 and 8.
This also splits the test cases to a distinct file, so they don't pollute encode()

"//purl/...",
])

encode_byte = {

Choose a reason for hiding this comment

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

I might argue that this should be a list, indexed by byte

@tonyaiuto
Copy link

Friengly ping

@aiuto
Copy link
Collaborator Author

aiuto commented Aug 6, 2025

Friendly ping

@aiuto
Copy link
Collaborator Author

aiuto commented Aug 22, 2025

Anyone there?

@TheGrizzlyDev
Copy link
Collaborator

Anyone there?

would it be ok if I reviewed it early next week?

@tonyaiuto
Copy link

Yes. You might also look at Yannic's version. That was failing on Bazel7 because of the difference in the way Bazel 7 and 8 handle JSON. This PR makes it work by not wrapping the test data as JSON.

@aiuto aiuto marked this pull request as draft October 20, 2025 15:10
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.

4 participants