-
-
Notifications
You must be signed in to change notification settings - Fork 673
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
Bump Go versions to 1.21.1 #3643
Conversation
We are updating to go1.21 at pingcap/tidb#45923. we have met the same problem. but we have to add some environment to work around it. |
Seems like 2 main issues:
|
There seems to be a 3rd problem: Not quite sure why though. |
Ah it's stated here: https://tip.golang.org/doc/go1.21#language
|
https://go.dev/doc/toolchain need to take care of this as well. @fmeum i think we could patch the env file when we download the sdk to set it at a fixed version? |
Could we also just set |
I would reserve the env var to downstream usages. I.e. if there is a rule that depend on a specific Go toolchain version, they could override using that. But tbh, i am not entirely sure 🤔 |
I think that we can never allow this behavior as it would result in a build action downloading a Go SDK. For the sake of hermeticity, we have to stick to toolchain resolution being the only way to bring in an SDK. We could look into reading |
Yeah make sense. I just don't like the word
I guess either |
@dragonsinth I think you were involved with setting up In Go 1.21, it seems like the order of I tried to look around and tested renaming packages to include an |
☝️ I sent #3655 to remove the |
I think the only real answer is to have |
@dragonsinth Realistically I don't think modifying The closest thing we could do is to wrap the go binary with a sh_binary that do the
but I am sure this would create more problems as well. Overall I think we should simply ask folks to stop relying on @fmeum I think most of the identified issues with 1.21.0 have been fixed. The remaining tasks are:
I will leave these to maintainers folks to handle. 🙏 |
I had this thought, but I don't know starlark well enough to try it out. I imagine it should just work tho, especially if the invocation were an
I mean, the core issue is that |
1cdcd06
to
1cb51a7
Compare
FYI it might be worth moving to 1.21.1 instead of 1.21.0 |
b17f90c
to
5ccdc6c
Compare
a5b4d82
to
5ccdc6c
Compare
@fmeum it seems like the version of x/crypto was changed to an older(?) version that does not contain that test target generated in popular_repo test.
So there are 2 ways to fix this: upgrade x/crypto dependency in popular_repos test (easier?) OR ensure gazelle deps are not overriding rules_go deps. |
I made a quick patch here for your reference master...sluongng:sluongng/patch-pop-repos |
@sluongng That patch looks great, could you submit it as a separate PR? I also submitted bazel-contrib/bazel-gazelle#1631. |
That patch partially depends on the Gazelle upgrade though. Do you want me to include the Gazelle upgrade in it? Or I could wait until after the Gazelle minor release (with your PR above) and upgrade rules_go + patch popular_repos. |
Nevermind then, I will just include the commit here (if you don't mind). |
Please feel free to 👍 |
@sluongng Any idea what's up with the |
hmm weird... it passes on my Mac M1, which suggests that it's something to do specifically with the amd64 implementation of salsa20 (reported in the stack trace) 🤔 Looking at git log from x/crypto, the affected code path seems to be I tried to reproduce it using BuildBuddy repo setup (+ same x/crypto and gazelle version), using BuildBuddy RBE (running on AMD64), here https://buildbuddy.buildbuddy.io/invocation/ba4a5e0c-b679-4b35-98c4-c4e683a62291?actionDigest=9715dff71e2a95b40f8aeafabb2dbc26a25cadd7200b8a369ed139f2cafd6cd6#action but the test passed 🙃 So I don't have a good way of reproducing this issue on my end. |
Hmm, it looks like the |
I found the remaining issue: #3696 |
9e781a0
to
6087f63
Compare
@sluongng There is a single remaining failure in |
I have not seen this before no. I would look into how Gazelle is treating that repo, or give #3678 a try. I might have time to dive into this later next week. |
Also requires updating Gazelle.
- Upgrade x/crypto to v0.13.0 - Switch to use commit instead of http - Remove irrelevant excludes - Remove `darwin_tests` (never used) - Add support for `build_excludes` to exclude incompatible non-test targets - Exclude @org_golang_x_crypto//nacl/secretbox:secretbox_test
6087f63
to
8aef0b9
Compare
Recent versions of Gazelle do generate the correct BUILD file, so I just patched that in manually. It's most likely just a result of us not having updated |
What type of PR is this?
What does this PR do? Why is it needed?
Which issues(s) does this PR fix?
Fixes #
Other notes for review