Skip to content

Conversation

@zecke
Copy link
Contributor

@zecke zecke commented Oct 5, 2024

Go 1.21 introduced support for godebug lines in go.mod and go.work files. Skip over these lines instead of failing

Related #1945

What type of PR is this?

Uncomment one line below and remove others.

Bug fix
Feature
Documentation
Other

What package or component does this PR mostly affect?

For example:

language/go
cmd/gazelle
go_repository
all

What does this PR do? Why is it needed?

Which issues(s) does this PR fix?

Fixes #

Other notes for review

Go 1.21 introduced support for godebug lines in go.mod and go.work
files. Skip over these lines instead of failing

Related bazel-contrib#1945
@zecke
Copy link
Contributor Author

zecke commented Oct 11, 2024

What if we handle this like the go_embed directive and update the x_defs?

@fmeum
Copy link
Member

fmeum commented Oct 11, 2024

Yeah, I'm all for treating this exactly like Go itself does, I just don't know how it's wired up exactly. Happy to review a change that goes beyond skipping.

@zecke
Copy link
Contributor Author

zecke commented Oct 11, 2024

Yeah, I'm all for treating this exactly like Go itself does, I just don't know how it's wired up exactly. Happy to review a change that goes beyond skipping.

From what I can tell is that one of the challenges of rules_go is that the builder is not using go build. Which means we don't benefit from some of the checks (e.g. checking if the flag exists, if one can link an internal package).

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.

2 participants