-
Notifications
You must be signed in to change notification settings - Fork 4k
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
C++ dependency pruning is broken for remote execution on Windows #11765
Comments
I a fixing a bug in ShowIncludesFilter [1]. For this I need to be able to invoke the include validation logic on a single artifact. Additionally, I'd consider this change a win for readability. This change is a no-op. However, it might have implications on memory usage when loose header checking is used. This change always constructs the loose header checking set. I think this is fine as it's my understanding that loose header checking is barely used and going away. [1] #11765 RELNOTES: None PiperOrigin-RevId: 321753605
To support compiling c++ on windows remotely, execution services must do a hack which they need to replace the paths of the lines matched pattern For example, I had a discussion with @meteorcloudy, and below are the options we came up to fix this:
/cc @lberki |
Hi I noticed that this issue has been open for a while. I'd like to propose another solution: I understand that this include validation is needed on Windows because we don't have a sandbox. However running with remote execution effectively functions as a sandbox, so arguably this include validation isn't needed when running remotely. If the remote compile is successful, that proves that all the required include files were declared correctly. Would there be a way to disable the validation on the client side (if it's possible to detect that the compile was executed remotely there), or if that's not possible, it could be done on the remote execution side either by removing the output of /showIncludes, or possibly by removing the /showIncludes flag altogether. My knowledge of Bazel is limited so apologies if I have misunderstood the problem. |
I a fixing a bug in ShowIncludesFilter [1]. For this I need to be able to invoke the include validation logic on a single artifact. Additionally, I'd consider this change a win for readability. This change is a no-op. However, it might have implications on memory usage when loose header checking is used. This change always constructs the loose header checking set. I think this is fine as it's my understanding that loose header checking is barely used and going away. [1] bazelbuild/bazel#11765 RELNOTES: None PiperOrigin-RevId: 321753605
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
When using remote execution in Windows Bazel will fail with an error of the type
This is because the dependency pruning code [1] scanning the /showParams output makes the incorrect assumption that source and generated files have a parent folder named 'execroot'. The assumption only holds for local execution without sandboxing. However, in remote execution we can't make any assumptions about the absolute location of files. Bazel doesn't know under which directory path an action is executed on a remote system.
[1] https://osscs.corp.google.com/bazel/bazel/+/master:src/main/java/com/google/devtools/build/lib/rules/cpp/ShowIncludesFilter.java;l=151;drc=0b081d8593d9eeb4e31aceed0b066ce4482ece49
Related #6931
The text was updated successfully, but these errors were encountered: