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

Cover missing cases during module extension label normalization #1219

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fmeum
Copy link
Contributor

@fmeum fmeum commented Dec 9, 2023

The previous logic missed to normalize cases such as "extension.bzl" and ":extension.bzl". Instead of enumerating cases, parse the label and track it in canonical form.

Related to bazelbuild/bazel#20482

@fmeum
Copy link
Contributor Author

fmeum commented Dec 9, 2023

CC @Wyverald

@larsrc-google
Copy link
Collaborator

Sorry, not familiar with this code base nor with Go.

@larsrc-google larsrc-google removed their request for review December 11, 2023 12:54
@@ -66,6 +66,9 @@ prox9 = use_extension(
prox9.use(label = "@name//:bar")
prox10 = use_extension("@dep//:extensions.bzl", "other_ext", dev_dependency = bool(1))
prox10.use(dict = {"foo": "bar"})
prox11 = use_extension("extension.bzl", "ext")
prox12 = use_extension(":extension.bzl", "ext")
prox13 = use_extension("//:extension.bzl", "ext")
Copy link
Member

Choose a reason for hiding this comment

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

what about use_extension("@repo_name//:extension.bzl", "ext")?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added more tests covering this case, is that what you had in mind?

@fmeum
Copy link
Contributor Author

fmeum commented Dec 20, 2023

This is running into the same kind of likely unrelated CI failures on Windows as my other PR.

@fmeum
Copy link
Contributor Author

fmeum commented Mar 28, 2024

@vladmos Friendly ping

1 similar comment
@fmeum
Copy link
Contributor Author

fmeum commented Apr 18, 2024

@vladmos Friendly ping

@fmeum fmeum force-pushed the fix-normalization branch 2 times, most recently from 169aa8f to 7e846e2 Compare April 18, 2024 10:39
The previous logic missed to normalize cases such as "extension.bzl"
and ":extension.bzl". Instead of enumerating cases, parse the label and
track it in canonical form.
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

3 participants