Skip to content

Add action type set diff tests, clean up#686

Closed
armandomontanez wants to merge 1 commit into
bazelbuild:mainfrom
armandomontanez:reorganize-action-sets
Closed

Add action type set diff tests, clean up#686
armandomontanez wants to merge 1 commit into
bazelbuild:mainfrom
armandomontanez:reorganize-action-sets

Conversation

@armandomontanez
Copy link
Copy Markdown
Collaborator

Adds diff tests to make reviewing changes to action type set structure easier. Also reorganizes the action type sets to reduce some duplication.

Adds diff tests to make reviewing changes to action type set structure
easier. Also reorganizes the action type sets to reduce some
duplication.
@armandomontanez armandomontanez added P3 We're not considering working on this, but happy to review a PR. (No assignee) category: toolchains type: internal cleanup Does not directly address a feature request or a bug report, but improves project hygiene labels Apr 10, 2026
@armandomontanez armandomontanez added the untriaged Team member has to triage this issue - assign priority, type, and owner (if possible). label Apr 14, 2026
Comment on lines +243 to +244
# This matches `compile_actions` with `lto_backend` omitted, because
# `lto_backend` actions do not instantiate the full set of build variables.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment is in the wrong place i think

)

cc_action_type_set(
name = "compile_actions_without_header_parsing",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is missing lto_backend

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The request to properly split assembly and preprocess assembly actions also might benefit from exclusions.

@lilygorsheneva
Copy link
Copy Markdown
Collaborator

#659 and #644
add new actions

@keith
Copy link
Copy Markdown
Member

keith commented May 15, 2026

@armandomontanez might need a follow up for my comment above

Copy link
Copy Markdown
Collaborator Author

@armandomontanez armandomontanez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The request to properly split assembly and preprocess assembly actions also might benefit from exclusions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: toolchains P3 We're not considering working on this, but happy to review a PR. (No assignee) type: internal cleanup Does not directly address a feature request or a bug report, but improves project hygiene untriaged Team member has to triage this issue - assign priority, type, and owner (if possible).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants