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

label.Parse fails on labels with hyphens in the repository name #1082

Closed
facundominguez opened this issue Jul 13, 2021 · 2 comments · Fixed by #1139
Closed

label.Parse fails on labels with hyphens in the repository name #1082

facundominguez opened this issue Jul 13, 2021 · 2 comments · Fixed by #1139

Comments

@facundominguez
Copy link
Contributor

facundominguez commented Jul 13, 2021

What version of gazelle are you using?

v0.23.0

What version of rules_go are you using?

v0.27.0

What version of Bazel are you using?

4.1.0

Does this issue reproduce with the latest releases of all the above?

Yes.

What operating system and processor architecture are you using?

nixos x86_64

What did you do?

lbl, err := label.Parse("@stackage-exe//tasty-discover:tasty-discover")
if err != nil {
    log.Fatal(err)
}

What did you expect to see?

I expected the label to be parsed since hyphens are accepted in repository names by bazel.
bazelbuild/bazel#11837
bazelbuild/bazel@e574d55

What did you see instead?

gazelle: label parse error: repository has invalid characters: "@stackage-exe//tasty-discover:tasty-discover"
facundominguez referenced this issue in tweag/gazelle_cabal Jul 13, 2021
@robfig
Copy link
Contributor

robfig commented Oct 16, 2021

Thanks for the issue report. I believe this can resolved by a simple change to //label/label.go. Are you interested in putting up a PR?

@facundominguez
Copy link
Contributor Author

facundominguez commented Oct 16, 2021

I have a workaround that is good enough for my use case, but I offer to test a fix when one is available.

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 a pull request may close this issue.

2 participants