-
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
Add NestedSet<PathFragment>
- and Artifact
-typed compile build variables
#22463
Conversation
This change is intended to be memory neutral, but prepares for structured C++ path mapping.
This change is intended to reduce memory usage slightly by possibly reusing nested set instances retained elsewhere. It also prepares for C++ path mapping.
This is stacked on #22462 (the first commit). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this matches my expectations on how this code will look in Starlark. Except the part with PathFragments, which will be reverted back to Strings. I think it’s still fine to have PathFragments in this PR.
NestedSet<PathFragment>
-typed compile build variableNestedSet<PathFragment>
- and Artifact
-typed compile build variables
@comius If possible, please let me know what the effect on benchmarks was. |
Will do. The PR will need some patching for the code behind the wall. |
Benchmarking with
|
@bazel-io fork 7.2.0 |
…iables This change prepares for C++ path mapping, which also needs to map include directories of generated headers. It may, as a side effect, reduce memory usage slightly by possibly reusing nested set instances retained elsewhere. Work towards bazelbuild#6526 Closes bazelbuild#22463. PiperOrigin-RevId: 636886343 Change-Id: Ic93d6439a51f37f44bb2ac67d0813c48c0c4a8bd
…uild var… (#22557) …iables This change prepares for C++ path mapping, which also needs to map include directories of generated headers. It may, as a side effect, reduce memory usage slightly by possibly reusing nested set instances retained elsewhere. Work towards #6526 Closes #22463. PiperOrigin-RevId: 636886343 Change-Id: Ic93d6439a51f37f44bb2ac67d0813c48c0c4a8bd Fixes #22533 Co-authored-by: Googler <[email protected]>
Basic support for path mapping for `CppCompile` actions is added by wiring up `PathMapper` with: * structured path variables for files and include paths (`Artifact` and `NestedSet<PathFragment>`) * inputs/outputs via `Spawn#getPathMapper()` * header discovery Also turns `external_include_paths` into a structured variable, which was missed in #22463. The following features are known to be unsupported for now: * `layering_check` (requires rewriting paths to and in module maps) * source tree artifacts (requires wiring up `PathMapper` in `CppCompileActionTemplate`) * location expanded paths to generated files such as sanitizer suppression lists (requires heuristically rewriting paths in `user_compile_flags`) These limitations will be lifted in follow-up PRs. Work towards #6526 RELNOTES: Experimental support for path mapping `CppCompile` actions can be enabled via `--modify_execution_info=CppCompile=+supports-path-mapping`. Closes #22445. PiperOrigin-RevId: 646109274 Change-Id: I6f4eb92b6be3052547f144c681b6588e9fc40693
Basic support for path mapping for `CppCompile` actions is added by wiring up `PathMapper` with: * structured path variables for files and include paths (`Artifact` and `NestedSet<PathFragment>`) * inputs/outputs via `Spawn#getPathMapper()` * header discovery Also turns `external_include_paths` into a structured variable, which was missed in bazelbuild#22463. The following features are known to be unsupported for now: * `layering_check` (requires rewriting paths to and in module maps) * source tree artifacts (requires wiring up `PathMapper` in `CppCompileActionTemplate`) * location expanded paths to generated files such as sanitizer suppression lists (requires heuristically rewriting paths in `user_compile_flags`) These limitations will be lifted in follow-up PRs. Work towards bazelbuild#6526 RELNOTES: Experimental support for path mapping `CppCompile` actions can be enabled via `--modify_execution_info=CppCompile=+supports-path-mapping`. Closes bazelbuild#22445. PiperOrigin-RevId: 646109274 Change-Id: I6f4eb92b6be3052547f144c681b6588e9fc40693
Basic support for path mapping for `CppCompile` actions is added by wiring up `PathMapper` with: * structured path variables for files and include paths (`Artifact` and `NestedSet<PathFragment>`) * inputs/outputs via `Spawn#getPathMapper()` * header discovery Also turns `external_include_paths` into a structured variable, which was missed in bazelbuild#22463. The following features are known to be unsupported for now: * `layering_check` (requires rewriting paths to and in module maps) * source tree artifacts (requires wiring up `PathMapper` in `CppCompileActionTemplate`) * location expanded paths to generated files such as sanitizer suppression lists (requires heuristically rewriting paths in `user_compile_flags`) These limitations will be lifted in follow-up PRs. Work towards bazelbuild#6526 RELNOTES: Experimental support for path mapping `CppCompile` actions can be enabled via `--modify_execution_info=CppCompile=+supports-path-mapping`. Closes bazelbuild#22445. PiperOrigin-RevId: 646109274 Change-Id: I6f4eb92b6be3052547f144c681b6588e9fc40693
Basic support for path mapping for `CppCompile` actions is added by wiring up `PathMapper` with: * structured path variables for files and include paths (`Artifact` and `NestedSet<PathFragment>`) * inputs/outputs via `Spawn#getPathMapper()` * header discovery Also turns `external_include_paths` into a structured variable, which was missed in bazelbuild#22463. The following features are known to be unsupported for now: * `layering_check` (requires rewriting paths to and in module maps) * source tree artifacts (requires wiring up `PathMapper` in `CppCompileActionTemplate`) * location expanded paths to generated files such as sanitizer suppression lists (requires heuristically rewriting paths in `user_compile_flags`) These limitations will be lifted in follow-up PRs. Work towards bazelbuild#6526 RELNOTES: Experimental support for path mapping `CppCompile` actions can be enabled via `--modify_execution_info=CppCompile=+supports-path-mapping`. Closes bazelbuild#22445. PiperOrigin-RevId: 646109274 Change-Id: I6f4eb92b6be3052547f144c681b6588e9fc40693
Basic support for path mapping for `CppCompile` actions is added by wiring up `PathMapper` with: * structured path variables for files and include paths (`Artifact` and `NestedSet<PathFragment>`) * inputs/outputs via `Spawn#getPathMapper()` * header discovery Also turns `external_include_paths` into a structured variable, which was missed in bazelbuild#22463. The following features are known to be unsupported for now: * `layering_check` (requires rewriting paths to and in module maps) * source tree artifacts (requires wiring up `PathMapper` in `CppCompileActionTemplate`) * location expanded paths to generated files such as sanitizer suppression lists (requires heuristically rewriting paths in `user_compile_flags`) These limitations will be lifted in follow-up PRs. Work towards bazelbuild#6526 RELNOTES: Experimental support for path mapping `CppCompile` actions can be enabled via `--modify_execution_info=CppCompile=+supports-path-mapping`. Closes bazelbuild#22445. PiperOrigin-RevId: 646109274 Change-Id: I6f4eb92b6be3052547f144c681b6588e9fc40693
Basic support for path mapping for `CppCompile` actions is added by wiring up `PathMapper` with: * structured path variables for files and include paths (`Artifact` and `NestedSet<PathFragment>`) * inputs/outputs via `Spawn#getPathMapper()` * header discovery Also turns `external_include_paths` into a structured variable, which was missed in #22463. The following features are known to be unsupported for now: * `layering_check` (requires rewriting paths to and in module maps) * source tree artifacts (requires wiring up `PathMapper` in `CppCompileActionTemplate`) * location expanded paths to generated files such as sanitizer suppression lists (requires heuristically rewriting paths in `user_compile_flags`) These limitations will be lifted in follow-up PRs. Work towards #6526 RELNOTES: Experimental support for path mapping `CppCompile` actions can be enabled via `--modify_execution_info=CppCompile=+supports-path-mapping`. Closes #22445. PiperOrigin-RevId: 646109274 Change-Id: I6f4eb92b6be3052547f144c681b6588e9fc40693 Closes #22875 Co-authored-by: Yun Peng <[email protected]>
This change prepares for C++ path mapping, which also needs to map include directories of generated headers. It may, as a side effect, reduce memory usage slightly by possibly reusing nested set instances retained elsewhere.
Work towards #6526