Skip to content

Conversation

@keith
Copy link
Member

@keith keith commented Nov 19, 2025

Previously textual_hdrs paths were eagerly fetched which breaks path
stripping. This wires these headers up separately to treat them like
hdrs.

Fixes bazelbuild/bazel#27718

Previously textual_hdrs paths were eagerly fetched which breaks path
stripping. This wires these headers up separately to treat them like
hdrs.

Fixes bazelbuild/bazel#27718
@keith
Copy link
Member Author

keith commented Nov 19, 2025

i chose to split these out from additional_exported_headers because that field is undocumented and publicly unused. If googlers validate it wouldn't break them we could instead change the type of that argument to be a list of Files instead of a list of strings.

continue
add_header(path = header.path, visibility = "", can_compile = False)
added_paths.add(header.path)

Copy link
Member Author

Choose a reason for hiding this comment

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

note that the core difference is below the paths are already strings, where here we are processing file objects in a context where their paths can be stripped by bazel

@keith
Copy link
Member Author

keith commented Nov 19, 2025

ptal @fmeum @pzembrod

Copy link
Collaborator

@fmeum fmeum left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Cc @c-mita as the original author

@fmeum
Copy link
Collaborator

fmeum commented Nov 19, 2025

@bazel-io fork 9.0.0

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.

layering_check for CppCompile doesn't work with generated files in textual_hdrs

2 participants