Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ShowIncludesFilter ignore execroot differences #6931

Closed
wants to merge 1 commit into from

Conversation

meteorcloudy
Copy link
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
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
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
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