-
Notifications
You must be signed in to change notification settings - Fork 653
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 gopackagesdriver for Go 1.18 by replicating stdlib and add test for stdliblist.go #3157
Merged
Commits on May 12, 2022
-
stdliblist: Fix for Go 1.18 by replicating stdlib
The stdliblist operation that the gopackagesdriver relies on fails on Go 1.18rc1 with the following error: ``` external/go_sdk/src/crypto/elliptic/p256_asm.go:24:12: pattern p256_asm_table.bin: cannot embed irregular file p256_asm_table.bin ``` We see this failure because Bazel builds a symlink tree of the GOROOT run `go list` with. However, since [CL 380475][1], the Go standard library uses `go:embed` to embed a file in `crypto/elliptic`, but `go:embed` does not support symlinks. [1]: https://go.dev/cl/380475 Fix this by having stdliblist copy the relevant portions of the GOROOT to run `go list` with. This matches [what the stdlib action does][2]. [2]: https://github.com/bazelbuild/rules_go/blob/e9a7054ff11a520e3b8aceb76a3ba44bb8da4c94/go/tools/builders/stdlib.go#L54-L57 Resolves bazelbuild#3080
Configuration menu - View commit details
-
Copy full SHA for a886327 - Browse repository at this point
Copy the full SHA a886327View commit details -
test/stdlib: Depend on _list_json
Add a dependency on `GoStdLib._list_json` to the stdlib test. This ensures that we can successfully build the JSON data needed by the gopackagesdriver.
Configuration menu - View commit details
-
Copy full SHA for 6c94802 - Browse repository at this point
Copy the full SHA 6c94802View commit details -
Fix file paths relative to OUTPUT_BASE
The prior version of this fix was incomplete because it generated incorrect relative paths. For example, before a path would be: __BAZEL_OUTPUT_BASE__/external/go_sdk/src/archive/tar/common.go But with the prior version of this change. __BAZEL_OUTPUT_BASE__/src/archive/tar/common.go It would drop the external/go_sdk from the path because the flattening logic in stdliblist makes these relative to the execRoot. We cannot overwrite external/go_sdk in execRoot because that's a path controlled by Bazel. Instead, create a parallel external/go_sdk under a new directory "root", and flatten paths relative to that.
Configuration menu - View commit details
-
Copy full SHA for fa5c659 - Browse repository at this point
Copy the full SHA fa5c659View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41c0139 - Browse repository at this point
Copy the full SHA 41c0139View commit details
Commits on May 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1de0b73 - Browse repository at this point
Copy the full SHA 1de0b73View commit details -
Configuration menu - View commit details
-
Copy full SHA for bcb289f - Browse repository at this point
Copy the full SHA bcb289fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89e0cf6 - Browse repository at this point
Copy the full SHA 89e0cf6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 68b94d1 - Browse repository at this point
Copy the full SHA 68b94d1View commit details
Commits on May 16, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8b0dde2 - Browse repository at this point
Copy the full SHA 8b0dde2View commit details
Commits on May 18, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0c12fc9 - Browse repository at this point
Copy the full SHA 0c12fc9View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0e87d6 - Browse repository at this point
Copy the full SHA d0e87d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 309f5de - Browse repository at this point
Copy the full SHA 309f5deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7913ea3 - Browse repository at this point
Copy the full SHA 7913ea3View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca25b77 - Browse repository at this point
Copy the full SHA ca25b77View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29449cc - Browse repository at this point
Copy the full SHA 29449ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a85829 - Browse repository at this point
Copy the full SHA 9a85829View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9f613a - Browse repository at this point
Copy the full SHA a9f613aView commit details
Commits on May 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e568d43 - Browse repository at this point
Copy the full SHA e568d43View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.