Skip to content

Make ShowIncludesFilter ignore execroot differences#6931

Closed
meteorcloudy wants to merge 1 commit intomasterfrom
showincludes_filter
Closed

Make ShowIncludesFilter ignore execroot differences#6931
meteorcloudy wants to merge 1 commit intomasterfrom
showincludes_filter

Conversation

@meteorcloudy
Copy link
Copy Markdown
Member

@meteorcloudy meteorcloudy commented Dec 14, 2018

Fixes #6847

This change is for making including scanning work on Windows for builds with remote caching or remote execution enabled.

After this change, the ShowIncludesFilter will look for the first execroot\<workspace_name> in the output header file paths, then it considers C:\...\execroot\<workspace_name> as the execroot path. Because execroot path could be different if remote cache is hit, we ignore it and only add the relative path as dependencies.

I'm quite unwilling to make this change, because parsing execroot\\<workspace_name> for execroot is not guaranteed to work always. But considering the only case this could go wrong is when people use an output base that already contains execroot\\<workspace_name>, which I think should never happen.

Change-Id: Ife2cb91c75f1b5b297851400e672db2b35ff09e0
@laszlocsomor
Copy link
Copy Markdown
Contributor

But considering the only case this could go wrong is when people use an output base that already contains execroot\<workspace_name>, which I think should never happen.

Could it go wrong if the package path contains that string?

@laszlocsomor
Copy link
Copy Markdown
Contributor

Could it go wrong if the package path contains that string?

Ah, never mind, the relevant line is the one below, and it only finds the first occurrence: https://github.com/bazelbuild/bazel/pull/6931/files#diff-43621b598be4b035d6872c0b0aa2c44aR74

@meteorcloudy
Copy link
Copy Markdown
Member Author

Thanks for the fast review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants