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

build files are not updated even when build_file_generation = "on" #1535

Closed
roundhd opened this issue May 10, 2023 · 3 comments
Closed

build files are not updated even when build_file_generation = "on" #1535

roundhd opened this issue May 10, 2023 · 3 comments

Comments

@roundhd
Copy link

roundhd commented May 10, 2023

What version of gazelle are you using?

HEAD 98250fb

What version of rules_go are you using?

v0.39.0

What version of Bazel are you using?

6.1.1

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

Yes

What operating system and processor architecture are you using?

darwin/arm64

What did you do?

I used the following go_repository rule:

go_repository(
    name = "com_github_mwitkow_go_proto_validators",
    build_file_proto_mode = "disable_global",
    importpath = "github.com/mwitkow/go-proto-validators",
    build_file_generation = "on",
    sum = "h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos=",
    version = "v0.3.2",
)

What did you expect to see?

I expected that the build files in external/com_github_mwitkow_go_proto_validators would be updated.

What did you see instead?

The build files in external/com_github_mwitkow_go_proto_validators are not updated and appear to be out of date for usage.

@alexeagle
Copy link
Contributor

Discussed with @fmeum on Slack - I think what's really wanted here is not to change the existing mode for build_file_generation but rather to add a new one like replace, otherwise similar to your PR.

This would be useful in cases where we run into bazelbuild/bazel#19301 under bzlmod, but didn't actually want any of the "Bazel module" content from the package in question, we just want a pure Go package. Erasing all BUILD files before generation solves for that case.

@fmeum
Copy link
Collaborator

fmeum commented Mar 28, 2024

Cc @linzhp

Contributions for this new mode would be very welcome.

@fmeum
Copy link
Collaborator

fmeum commented Jun 8, 2024

This has been fixed in #1802.

@fmeum fmeum closed this as completed Jun 8, 2024
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.

3 participants