Skip to content

Support Bazel path mapping for PMD actions - #124

Open
Bencodes wants to merge 1 commit into
masterfrom
support-path-mapping
Open

Bencodes wants to merge 1 commit into
masterfrom
support-path-mapping

Conversation

@Bencodes

@Bencodes Bencodes commented Nov 8, 2026

Copy link
Copy Markdown
Member

Under --experimental_output_paths=strip, every pmd_test and any target with generated sources failed: --execution-result was a string path and the source lists were written with string paths, so Bazel couldn't map them.

  • Pass --execution-result as a File.
  • Write srcs/srcs_ignore lists as param files of the PMD action, so their contents are mapped too (run_pmd.sh now reads them from --file-list= / --exclude-file-list=).
  • Declare supports-path-mapping on the PMD action.

Analysis tests updated for the param-file lists. Integration tests pass with and without path mapping.

This also removes the generated srcs_*.txt files, which supersedes #121.

--execution-result was passed as a string and the source lists were written
by a separate action with string paths, so neither was rewritten under
--experimental_output_paths=strip: every pmd_test and any target with
generated sources failed. Pass the result as a File, write the source lists
as param files of the PMD action, and declare supports-path-mapping.
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.

1 participant