Add action type set diff tests, clean up#686
Conversation
Adds diff tests to make reviewing changes to action type set structure easier. Also reorganizes the action type sets to reduce some duplication.
| # This matches `compile_actions` with `lto_backend` omitted, because | ||
| # `lto_backend` actions do not instantiate the full set of build variables. |
There was a problem hiding this comment.
comment is in the wrong place i think
| ) | ||
|
|
||
| cc_action_type_set( | ||
| name = "compile_actions_without_header_parsing", |
There was a problem hiding this comment.
as a test case probably worth adding the use of this to this pr, which is how i found this issue:
load("//cc/toolchains:args.bzl", "cc_args")
load("//cc/toolchains:feature.bzl", "cc_feature")
cc_feature(
name = "feature",
args = [
":flags",
":header_parsing_flags",
],
overrides = "//cc/toolchains/features/legacy:compiler_input_flags",
visibility = ["//visibility:public"],
)
cc_args(
name = "flags",
actions = ["//cc/toolchains/actions:compile_actions_without_header_parsing"],
args = [
"-c",
"{source_file}",
],
format = {"source_file": "//cc/toolchains/variables:source_file"},
requires_not_none = "//cc/toolchains/variables:source_file",
)
cc_args(
name = "header_parsing_flags",
actions = ["//cc/toolchains/actions:cpp_header_parsing"],
args = ["{source_file}"],
format = {"source_file": "//cc/toolchains/variables:source_file"},
requires_not_none = "//cc/toolchains/variables:source_file",
)I think this is where exclusions would be more clear for spotting bugs
There was a problem hiding this comment.
The request to properly split assembly and preprocess assembly actions also might benefit from exclusions.
|
@armandomontanez might need a follow up for my comment above |
armandomontanez
left a comment
There was a problem hiding this comment.
@armandomontanez might need a follow up for my comment above
Gah--I was out traveling last week and this got buried in my inbox.
| ) | ||
|
|
||
| cc_action_type_set( | ||
| name = "compile_actions_without_header_parsing", |
There was a problem hiding this comment.
The request to properly split assembly and preprocess assembly actions also might benefit from exclusions.
Adds diff tests to make reviewing changes to action type set structure easier. Also reorganizes the action type sets to reduce some duplication.