Skip to content

strip_include_prefix doesn't apply to textual_hdrs #12424

@chandlerc

Description

@chandlerc

Description of the problem / feature request:

strip_include_prefix in cc_* rules is super useful, but it needs to apply to textual_hdrs as well as hdrs. The inconsistency is extremely problematic for rules successfully using either textual_hdrs or strip_include_prefix.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Given this rule:

cc_library(
    name = "test",
    hdrs = ["some/path/prefix/normal_header.h"
    textual_hdrs = ["some/path/prefix/textual_header.h"],
    strip_include_prefix = "some/path/prefix",
)

Rules depending on :test can #include "normal_header.h" as expected, but cannot #include "textual_header.h".

What operating system are you running Bazel on?

Impacts all OSes AFAICT, tested on Linux.

What's the output of bazel info release?

release 3.3.1

Metadata

Metadata

Assignees

Labels

P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)team-Rules-CPPIssues for C++ rulestype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions