-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Implement Platform-Based Flags #19409
Comments
Work towards platform-based flags: #19409. PiperOrigin-RevId: 565770775 Change-Id: Ibb75e66f6a73aad565ade28e5cda99ebaa280121
Also remove the unneeded PlatformBaseRule. Work towards platform-based flags: #19409. PiperOrigin-RevId: 567075741 Change-Id: I5ba99d3b52d17b5786de49561a497b5802001c00
Also remove the exec property fields from the Starlark API. Work towards platform-based flags: #19409. PiperOrigin-RevId: 568265920 Change-Id: I5a4146f93167901455c2f4d3856505840aeb64f1
Work towards platform-based flags: #19409. PiperOrigin-RevId: 568853694 Change-Id: I468d33b9eb0138e35274f7fd188c82ac851fbef4
Work towards platform-based flags: #19409. PiperOrigin-RevId: 569576336 Change-Id: I7c7f37c833987aed83b04aaddac234ef3b17de2e
Remove BuildConfigurationKey from platform mapping calculations. This enables locking down access to BCK contents from other locations. Work towards platform-based flags: #19409. PiperOrigin-RevId: 570430837 Change-Id: I5645a6782015455ebf3513cbac60fa78b0696e57
Work towards platform-based flags: #19409. PiperOrigin-RevId: 570779049 Change-Id: I142c44db575bd3f4b77d369285a9e97f57227271
…nces. Work towards platform-based flags: #19409. PiperOrigin-RevId: 570816210 Change-Id: I2cd28c20e05cf1fd2401632bb856e9cf93955a7e
This further centralizes BuildConfigurationKey creation. Work towards platform-based flags: #19409. PiperOrigin-RevId: 571362276 Change-Id: I09736443ec18cab51feddc153d3a5a7c49761a09
Next will be to rename `withoutPlatformMapping`. Work towards platform-based flags: #19409. PiperOrigin-RevId: 571363118 Change-Id: I170d83c8cc6550f33abeaa6b11cb58447104b134
The name `create` is much clearer and doesn't expose internal implementation details. Work towards platform-based flags: #19409. PiperOrigin-RevId: 571376423 Change-Id: I4f8c29d22a0e16dd331749c07dba37685caf3382
Work towards platform-based flags: #19409. PiperOrigin-RevId: 580317682 Change-Id: Ia84894632c8344b983f73e41070a1a24ac43bc2b
Work towards platform-based flags: #19409. PiperOrigin-RevId: 580452068 Change-Id: If94e0fbd9a815bfe3decca21ef1fd58003b4c366
Work towards platform-based flags: #19409. PiperOrigin-RevId: 580499529 Change-Id: Icbcd46b25643ce7271bbec9eb1d4b0fedc2acef7
The flags being read by a transition are by definition a subset of all flags, and typically are a much smaller subset, so let's process the smaller set instead of every flag in the configuration. Work towards platform-based flags: #19409. PiperOrigin-RevId: 587681561 Change-Id: I8b329ef3e9447db08a0cedb9bb1b5ef60fe6458f
This means they cannot be changed during a transition. Currently only handles starlark transitions. The exec transition is specifically exempted, because it is a core part of configuration handling. Work towards platform-based flags: #19409. PiperOrigin-RevId: 596917609 Change-Id: Icae25fd907dd1a16e2c83cefe1a14a162438dc99
If it cannot be changed in transitions, all errors will be caught in the first usage (in `SkyframeExecutor.createBuildConfigurationKey`), and so no further errors need to be considered. Work towards platform-based flags: #19409. PiperOrigin-RevId: 596918285 Change-Id: I68a1808d836716893491fd212eb2b5bc9352f541
…eyProducer. This situation cannot happen. Work towards platform-based flags: #19409. PiperOrigin-RevId: 596958087 Change-Id: I8870973bc0f940375ff9829cb3da30dd5c12c2dc
Work towards platform-based flags: #19409. PiperOrigin-RevId: 597221978 Change-Id: I9740eea9d91b384548b45260fa9c69b2a8302197
Work towards platform-based flags: #19409. PiperOrigin-RevId: 598953443 Change-Id: I55cd314ee644934032a39d7d23dd9a742fe2c0f7
Work towards platform-based flags: #19409. PiperOrigin-RevId: 598954569 Change-Id: I29056b09ebdb898fee4a1ec1621fb01b8d8d8f09
This essentially exposes BuildConfigurationKeyProducer as a SkyFunction. Work towards platform-based flags: #19409. PiperOrigin-RevId: 599838440 Change-Id: Id6c0b00f43fe813f77dbed8c7a6fee0f989649a6
…tances. This removes duplication of logic. Work towards platform-based flags: #19409. PiperOrigin-RevId: 599862509 Change-Id: Ib0c17a90ad9fd475d758dff3be68994202bb8d98
…tances. This removes duplication of logic. Work towards platform-based flags: #19409. PiperOrigin-RevId: 599870463 Change-Id: I86f08697ed264b9de939bceb7a544d1c3d5fe0da
In some cases platofrm based flags cause extra targets to be present. Work towards platform-based flags: #19409. PiperOrigin-RevId: 621930695 Change-Id: I5b72bb07e8385e2fc1c4c478504385ababca3415
Work towards platform-based flags: #19409. PiperOrigin-RevId: 621936486 Change-Id: Ib5bf2fed705a1c1bd68de3e08d38a8cdf9be9986
…ng the special empty configuration and related actions. Work towards platform-based flags: #19409. PiperOrigin-RevId: 623208595 Change-Id: I2af23afe893599e5ac7a338e5e09680495d1faa2
…abel in the results. Work towards platform-based flags: #19409. PiperOrigin-RevId: 623820511 Change-Id: Iaa7bd29654667c8c1ec12828ac7f54043915ed04
Work towards platform-based flags: #19409. PiperOrigin-RevId: 630030455 Change-Id: I91933097a31ad5fe1ff5955e58261bde357362d0
…to override builtins. Overriding builtins is flaky with upcoming work when the configuration changes. Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 621472041 Change-Id: Ib61f14dee822bc0e1fc24eba24865c9d5b3dc0b9
Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 621476576 Change-Id: Ic4b88c051b79d13f0ac7fc12be605836fe22411d
Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 621555402 Change-Id: Id3c70a34844f0ec4ba0ca690827d228acc3493b0
Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 621567588 Change-Id: I4a833e1458d7c4f6f78ce2069b3104acfddd211f
Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 621568874 Change-Id: Id880b5fbf3085ee2dbef966aba8ccda9b442c75d
Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 621865160 Change-Id: Id9ef8a342dcdf9dde44b367a8c74088dde7ae9b6
In some cases platofrm based flags cause extra targets to be present. Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 621930695 Change-Id: I5b72bb07e8385e2fc1c4c478504385ababca3415
Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 621936486 Change-Id: Ib5bf2fed705a1c1bd68de3e08d38a8cdf9be9986
…ng the special empty configuration and related actions. Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 623208595 Change-Id: I2af23afe893599e5ac7a338e5e09680495d1faa2
…abel in the results. Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 623820511 Change-Id: Iaa7bd29654667c8c1ec12828ac7f54043915ed04
Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 630030455 Change-Id: I91933097a31ad5fe1ff5955e58261bde357362d0
Flag merging is used in platform mappings, and the in progress platform-based flags. Issues: - Implicit options are droppped - Repeating native and Starlark flags overwrite previous values instead of appending. Work towards platform-based flags: bazelbuild#19409. PiperOrigin-RevId: 634039493 Change-Id: I65006ed00bef94e7f944afc447315c6e9504b50b
Current status: I have a working implementation, except that there's an issue with repeatable flags (ie, The issue (which also exists in platform mappings) is that setting a repeatable flag in the I have some example tests that show the error: #22386 (see errors: https://buildkite.com/bazel/bazel-bazel-github-presubmit/builds/21626) The current goal is to try and detect and warn when this happens (for native flags: not doable for Starlark flags), submit platform based flags, then fix the merging (which requires fixing the Starlark options parser, thus #22365). |
…AnalysisMock. Work towards platform-based flags: #19409. PiperOrigin-RevId: 635457036 Change-Id: I53d1429ca580ef7f0c933243e4b4f953d3c9394a
…sion. Otherwise, anything that depends on `@platform//cpu` will fail. Work towards platform-based flags: #19409. PiperOrigin-RevId: 635502289 Change-Id: I2431a7bc849d2d0b0c6b4573de6a4838ffe9478e
Also properly handles implicit options. Work towards platform-based flags: #19409. PiperOrigin-RevId: 639053307 Change-Id: Iceb376d81fdc874358ad0d5b88923803b229d784
Some tests (specifically those that use `usesInliningBzlLoadFunction`) mutate the builtins, and so need to be able to reset the cache, making the comment at [`BzlLoadFunction$InlineCacheManager.reset`](https://cs.opensource.google/bazel/bazel/+/master:src/main/java/com/google/devtools/build/lib/skyframe/BzlLoadFunction.java;drc=2c0faf93deae61bfc0bb1c42becbca4c49c988e6;l=1551) invalid. Work towards platform-based flags: #19409. PiperOrigin-RevId: 640607616 Change-Id: I3c30b2888c99b46084ea2519870dc6d61c5a2a79
…ge options are changed. This prevents issues where incomplete skyframe nodes are still cached when tests change state. Work towards platform-based flags: #19409. PiperOrigin-RevId: 641037026 Change-Id: Ibb2ba4b1413b516d2f2214244d3f536fb5583ca7
…flags. Fixes platform-based flags: #19409. PiperOrigin-RevId: 641217049 Change-Id: I0a873eb708f8919a5bd5d62ca35dba5e51b80888
Work towards platform-based flags: #19409. PiperOrigin-RevId: 641224216 Change-Id: I84e28a526c06c098dfeafb049373e1a8b5a3e067
The main functionality is now in (and documented). The only work remaining is to clean up how we handle merging repeated flags, but that's tracked in #22453, so I am closing this as complete. |
This is a tracking issue for the implementation of Platform-Based Flags.
Incomplete Task list:
flags
attribute toplatform
PlatformInfo
providerThe text was updated successfully, but these errors were encountered: