-
Notifications
You must be signed in to change notification settings - Fork 433
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
Persistent worker in C++ #667
base: main
Are you sure you want to change the base?
Commits on Mar 31, 2021
-
new attempt at rust persistent worker: just the build setting for now
going to try this in C++ and have it all work nicely. This commit just sets up a build setting, so that users can customize whether to use the worker by just setting the flag on the command line or in a local bazelrc file. This allows easily switching between worker and non-worker. Use as `bazel build <rust target> --@rules_rust//rust:use-worker`. Obviously this will fail right now.
Configuration menu - View commit details
-
Copy full SHA for 1ab68b2 - Browse repository at this point
Copy the full SHA 1ab68b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0cd026 - Browse repository at this point
Copy the full SHA d0cd026View commit details -
next up is to actually execute the command.
Configuration menu - View commit details
-
Copy full SHA for d8e95ec - Browse repository at this point
Copy the full SHA d8e95ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 122be7f - Browse repository at this point
Copy the full SHA 122be7fView commit details -
Worker runs command, but without incremental mode and without redirec…
…ting stderr correctly.
Configuration menu - View commit details
-
Copy full SHA for 45da97c - Browse repository at this point
Copy the full SHA 45da97cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9540dc6 - Browse repository at this point
Copy the full SHA 9540dc6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3018ff9 - Browse repository at this point
Copy the full SHA 3018ff9View commit details -
When running the worker, the original executable should be marked as …
…an input via tools.
Configuration menu - View commit details
-
Copy full SHA for ed6a0c3 - Browse repository at this point
Copy the full SHA ed6a0c3View commit details -
A CodedOutputStream preserves its contents in some sense, possibly because of the use of EpsOutputStream and FileOutputStream beneath, which seem to keep buffers around. This was causing the original WorkResponse to be repeatedly written to stdout on future invocations of the worker, leading to Bazel not waiting around for the command to actually run. Specifically, I believe what was happening was, the internal buffer had the initial WorkResponse. Every time Bazel sent a request, it tried to read the response and protobuf would just send the already available response right away.
Configuration menu - View commit details
-
Copy full SHA for 922efe2 - Browse repository at this point
Copy the full SHA 922efe2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8da854 - Browse repository at this point
Copy the full SHA a8da854View commit details -
Encode target triple in incremental dir path
Consider the layout documented in https://github.com/rust-lang/cargo/blob/58a961314437258065e23cb6316dfc121d96fb71/src/cargo/core/compiler/layout.rs#L50. It relies on the incremental dir being in `target/<triple>/{debug,release}/incremental`. With this change, Bazel is creating a very similar structure.
Configuration menu - View commit details
-
Copy full SHA for e02966b - Browse repository at this point
Copy the full SHA e02966bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 41f8049 - Browse repository at this point
Copy the full SHA 41f8049View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7981f84 - Browse repository at this point
Copy the full SHA 7981f84View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83de9fe - Browse repository at this point
Copy the full SHA 83de9feView commit details -
Configuration menu - View commit details
-
Copy full SHA for c8165c7 - Browse repository at this point
Copy the full SHA c8165c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfddfb1 - Browse repository at this point
Copy the full SHA cfddfb1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66623d7 - Browse repository at this point
Copy the full SHA 66623d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b73681 - Browse repository at this point
Copy the full SHA 8b73681View commit details