Skip to content

Use File.is_directory for C++ tree artifacts - #813

Open
dzbarsky wants to merge 1 commit into
bazelbuild:mainfrom
dzbarsky:codex/starlarkify-tree-artifact-detection
Open

Use File.is_directory for C++ tree artifacts#813
dzbarsky wants to merge 1 commit into
bazelbuild:mainfrom
dzbarsky:codex/starlarkify-tree-artifact-detection

Conversation

@dzbarsky

Copy link
Copy Markdown
Contributor

Replace all five _cc_internal.is_tree_artifact calls in C++ compilation with the native Starlark File.is_directory property. Open-source Bazel creates directory artifacts for generated source and header trees, and existing C++ module-map code already uses the same property.

Add configured-target regression tests covering generated source directories and generated header directories.

Validation: buildifier -mode=check and five passing C++ library analysis tests, including both generated-directory regression cases.

@dzbarsky
dzbarsky marked this pull request as ready for review July 31, 2026 18:26
@trybka

trybka commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

@pzembrod would like you to take a look at this one given the TreeArtifact overlap. Specifically is_tree_artifact has an open TODO to consider if it can be replaced with artifact.is_directory, which leads me to wonder if you had thoughts as to why it may not be trivial.

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