-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Enable C++ deps pruning on Windows when PARSE_SHOWINCLUDES is available. #17928
Conversation
I'll bounce this to @oquenchil and @meteorcloudy since they were more closely involved. Let me know if y'all need me to take a look at this. |
src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java
Show resolved
Hide resolved
@oquenchil this simple PR is a major blocker for us and badly needs your attention. Could you please merge it? |
This fixes bazelbuild#14947. Closes bazelbuild#17928. PiperOrigin-RevId: 521446074 Change-Id: I4bc155f0245bc1933e86cd0b37762263437ed1fe
This fixes bazelbuild#14947. Closes bazelbuild#17928. PiperOrigin-RevId: 521446074 Change-Id: I4bc155f0245bc1933e86cd0b37762263437ed1fe
Hi, is it possible to provide a mechanism to disable pruning on Windows manually? The main problem is that the
If bazel fails to parse the We also couldn't remove the I have considered the following options:
If one of the above solutions is feasible, or there is a better solution, we are willing to help prepare a PR. Thanks. |
I believe we can make option 1 work, /cc @buildbreaker2021 as the C++ rule owner. |
I did some experiments:
Though we can workaround the issue without changing Bazel itself, I think it's important to prevent pruning from causing wrong builds without the user's knowledge. Since Bazel can only understand UTF-8 encoding, I think we can try decoding the output with UTF-8. If it fails, warn the user that pruning will not work correctly. Then, the user can choose to either change the encoding or turn off the parse_showincludes feature. Should I create a post on bazel-discuss and continue the discussion there? |
Nice finding! I guess we can add this env var as a default to the
For remote execution, I remember we have some trick to ignore the execroot prefix, not sure why that doesn't work. bazel/src/main/java/com/google/devtools/build/lib/rules/cpp/ShowIncludesFilter.java Lines 167 to 180 in b27ca73
Sure, we recommend to use https://github.com/bazelbuild/bazel/discussions now. |
I have created a discussion here: #19451. |
This fixes #14947.