Skip to content

feat: Validate file extensions on devicetree source attributes - #118

Merged
jacky8hyf merged 1 commit into
bazel-contrib:mainfrom
UebelAndre:mnemonic
Sep 23, 2026
Merged

jacky8hyf merged 1 commit into
bazel-contrib:mainfrom
UebelAndre:mnemonic

Conversation

@UebelAndre

Copy link
Copy Markdown
Contributor

Replace allow_files = True with explicit extension allowlists so that misplaced files are rejected at analysis time instead of producing a confusing dtc failure (or, for dtb_composite, silently feeding a non-FDT input to fdtoverlay):

attribute extension
devicetree_library.hdrs .dts, .dtsi, .dtso, .h
dtb.srcs .dts, .dtsi, .h
dtbo.srcs .dtsi, .dtso, .h
dtb_composite.base .dtb
dtb_composite.overlays .dtbo

Replace `allow_files = True` with explicit extension allowlists so that
misplaced files are rejected at analysis time instead of producing a
confusing dtc failure (or, for `dtb_composite`, silently feeding a
non-FDT input to fdtoverlay):

  devicetree_library.hdrs  .dts  .dtsi .dtso .h
  dtb.srcs                 .dts  .dtsi .h
  dtbo.srcs                .dtsi .dtso .h
  dtb_composite.base       .dtb
  dtb_composite.overlays   .dtbo

@jacky8hyf jacky8hyf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This was written because I thought bazelbuild/bazel#10228 was the case.

@jacky8hyf
jacky8hyf added this pull request to the merge queue Sep 23, 2026
Merged via the queue into bazel-contrib:main with commit a4c9d2e Sep 23, 2026
12 checks passed
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