Skip to content

Conversation

@geonik-code
Copy link


NOTE: This change is not tested in all cases. It serves as sample implementation for:
FR: write_source_files and write_source_file shall support select() #781

Type of change

  • New feature or functionality (change which adds functionality)

  • Relevant documentation has been updated

  • Suggested release notes are provided below:

Test plan

  • Manual testing; please provide instructions so we can reproduce:
write_source_file(
    name = "write_foo_c",
    in_file = ":foo.c",
    out_file = {
        "//conditions:default": "//workspace/subdir:foo.c",
    },
    executable = False,
    additional_update_targets = [],
    suggested_update_target = ":write_foo_h",
    diff_test = True,
    check_that_out_file_exists = False,
    out_file_is_select = True,
)

Add additional argument to write_source_file macro: `out_file_is_select = False`, that enables support for defining select dictionary as out_file. For example:
`
write_source_file(
    name = "write_foo_c",
    in_file = ":foo.c",
    out_file = {
        "//conditions:default": "//workspace/subdir:foo.c",
    },
    executable = False,
    additional_update_targets = [],
    suggested_update_target = ":write_foo_h",
    diff_test = True,
    check_that_out_file_exists = False,
    out_file_is_select = True,
)
`
Add support for select in write_source_file.bzl
@CLAassistant
Copy link

CLAassistant commented Mar 7, 2024

CLA assistant check
All committers have signed the CLA.

@geonik-code geonik-code closed this Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants