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

Gazelle:resolve support bzlmod repo canonical name #1732

Open
sluongng opened this issue Feb 9, 2024 · 1 comment
Open

Gazelle:resolve support bzlmod repo canonical name #1732

sluongng opened this issue Feb 9, 2024 · 1 comment

Comments

@sluongng
Copy link
Contributor

sluongng commented Feb 9, 2024

More details of what I am attempting could be found in bazelbuild/bazel#19301

Given a bzlmod directive like this

go_deps.gazelle_override(
    directives = ["gazelle:resolve go github.com/some/path @@//my/target"],
    path = "github.com/foo/bar",
)

The BUILD file would be generated with @//my/target instead of @@//my/target.

This unfortunately make it harder for us to overcome the issue linked above.

The current workaround is to use a patch file instead of gazelle directives, it would be nice if Gazelle could accept @@ as the repo name.

@fmeum
Copy link
Collaborator

fmeum commented Feb 12, 2024

We generally don't want Gazelle to emit canonical repository names into BUILD files at all as that can break strict deps and go unnoticed for a long time.

I see how this would allow a less tedious workaround for the linked Bazel issue, but I would strongly prefer just fixing that issue soon instead (say for 7.2.0 at the latest).

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

No branches or pull requests

2 participants