Include rctx.os.{name,arch} in the pre declared inputs hash#29148
Include rctx.os.{name,arch} in the pre declared inputs hash#29148fmeum wants to merge 1 commit intobazelbuild:masterfrom
rctx.os.{name,arch} in the pre declared inputs hash#29148Conversation
|
@bazel-io fork 9.0.2 |
|
@bazel-io fork 9.1.0 |
|
@bazel-io fork 8.7.0 |
|
I guess there is no easy way to only add those when the repo rule inspects the value? Does http_archive actually do that? |
|
We could track access to these fields as recorded inputs. That is a bit more complicated, but it could get us this behavior. I can try that instead if you think it's worth it - I could see this go both ways. |
This is probably not very easy -- these are marked I guess counting os.name/arch as predeclared inputs is the least harmful way to go about this. (in which case please add a small RELNOTES) |
|
Done. Always including these values in the key also avoids nasty surprises if the output implicitly depends on the OS. Since cross-platform testing is rare, such issues would be very difficult to find for ruleset authors. |
…uild#29148) ### Description ### Motivation Fixes bazel-contrib/rules_go#4581 ### Build API Changes No ### Checklist - [ ] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). ### Release Notes RELNOTES: The local and remote repo contents cache now include the host OS and CPU architecture in the cache key. Closes bazelbuild#29148. PiperOrigin-RevId: 893352625 Change-Id: I02c0ded7ffe2b5aa9bc2ef489dc5240b5716ebdf
…uild#29148) ### Description ### Motivation Fixes bazel-contrib/rules_go#4581 ### Build API Changes No ### Checklist - [ ] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). ### Release Notes RELNOTES: The local and remote repo contents cache now include the host OS and CPU architecture in the cache key. Closes bazelbuild#29148. PiperOrigin-RevId: 893352625 Change-Id: I02c0ded7ffe2b5aa9bc2ef489dc5240b5716ebdf
…#29148) (#29195) ### Description ### Motivation Fixes bazel-contrib/rules_go#4581 ### Build API Changes No ### Checklist - [ ] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). ### Release Notes RELNOTES: The local and remote repo contents cache now include the host OS and CPU architecture in the cache key. Closes #29148. PiperOrigin-RevId: 893352625 Change-Id: I02c0ded7ffe2b5aa9bc2ef489dc5240b5716ebdf Commit 2ec24b4 Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
…#29148) (#29194) ### Description ### Motivation Fixes bazel-contrib/rules_go#4581 ### Build API Changes No ### Checklist - [ ] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). ### Release Notes RELNOTES: The local and remote repo contents cache now include the host OS and CPU architecture in the cache key. Closes #29148. PiperOrigin-RevId: 893352625 Change-Id: I02c0ded7ffe2b5aa9bc2ef489dc5240b5716ebdf Commit 2ec24b4 Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Description
Motivation
Fixes bazel-contrib/rules_go#4581
Build API Changes
No
Checklist
Release Notes
RELNOTES: The local and remote repo contents cache now include the host OS and CPU architecture in the cache key.