Register discovered headers for path mapping#29547
Open
layus wants to merge 1 commit into
Open
Conversation
fmeum
reviewed
May 15, 2026
| * (headers found via .d file parsing) do have collisions, causing a crash at execution time. | ||
| */ | ||
| @Override | ||
| public NestedSet<Artifact> getAdditionalArtifactsForPathMapping() { |
Collaborator
There was a problem hiding this comment.
This method should only be overridden for very special use cases. Allowed derived inputs are relevant for path mapping for any action that discovers inputs, so I think it's cleaner if we just add getAllowedDerivedInputs() at the call site.
| * execution time. | ||
| */ | ||
| @Test | ||
| public void cppCompileAction_returnsAdditionalArtifactsForPathMapping() throws Exception { |
Collaborator
There was a problem hiding this comment.
This is very "unit test-y" and won't give us much assurance that C++ actions with header collisions build correctly. Could you try to add an integration test to path_mapping_test.sh instead?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds all the discovered headers to the list of artifacts checked for collision by path mapping. This ensure we do not apply path mapping when several of these headers conflict. Otherwise it fails later on, when computing merkle hashes, with a big bad crash.
Motivation
Fixes #29546
Build API Changes
Not really. It may silently disable path mapping on actions that used to support it before.
Checklist
Release Notes
RELNOTES: None