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

Fix name of protoc_gen_star_v2 repo #900

Merged
merged 2 commits into from
Jun 23, 2023

Conversation

alexbozhenko
Copy link
Contributor

@alexbozhenko alexbozhenko commented Jun 22, 2023

When this project is used in a repo that uses Gazelle, the build fails with the following error:
#535 (comment)

That error was introduced when protoc_gen_star was updated to v2 in #783
and dependencies.bzl was (I believe) manually updated.

Should gazelle be used to update dependencies.bzl, it would choose com_github_lyft_protoc_gen_star_v2 as a name for the repo, as I showed here:
alexbozhenko#1

This PR updates all references to that repo to use the correct name, which is expected by Gazelle.
PR was created with:

sed -i 's/com_github_lyft_protoc_gen_star/com_github_lyft_protoc_gen_star_v2/g' $(rg -l com_github_lyft_protoc_gen_star)

@alexbozhenko
Copy link
Contributor Author

alexbozhenko commented Jun 22, 2023

@pdecks, @elliotmjackson or @rodaine do you mind taking a look?

@rodaine rodaine merged commit 9652357 into bufbuild:main Jun 23, 2023
3 checks passed
@rodaine rodaine added the Bazel Bazel related issues label Jun 23, 2023
@alexbozhenko
Copy link
Contributor Author

@rodaine Could you please cut a new minor release that includes this fix? Would it be a lot of work?

@rodaine
Copy link
Member

rodaine commented Jun 26, 2023

htuch pushed a commit to envoyproxy/envoy that referenced this pull request Dec 11, 2023
Similar to bufbuild/protoc-gen-validate#900
correct naming should include the major version.

https://go.dev/ref/mod#module-path

If the module is released at major version 2 or higher, the module path must end with a major version suffix like /v2. This may or may not be part of the subdirectory name. For example, the module with path golang.org/x/repo/sub/v2 could be in the /sub or /sub/v2 subdirectory of the repository golang.org/x/repo.

So go_repository stanza also should include the major version, to distinguish between the different major versions of the module, that can coexist.

Signed-off-by: Alex Bozhenko <abozhenko@pinterest.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bazel Bazel related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants