-
Notifications
You must be signed in to change notification settings - Fork 236
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
prost fork is problematic when building buck2 with Nix #149
Comments
In an incredible twist of fate I just looked at the prost repository, and this commit is very relevant, from 2 days ago! My suspicion was wrong! So maybe this would actually work right now, if the |
We've been working on upstreaming this, but I'll take a look at whether I can rebase this |
Yeah, no rush on anybody, I can still hold onto the undo-boxing-patch if needed. If a rebase can't work, just cherry-picking that one patch to your fork might get me somewhere. |
It looks like upstream accepted the patch to prost, and I can also say that tokio-rs/prost@f63691b also fixed the problem in the original comment, allowing Nix to build prost from the git repository -- combined, I can get my version of buck2 building again, I think! So we still need to:
|
Commit afb3307 introduced a patched version of the
prost
andtonic
dependencies to support boxing large fields in GRPC messages. This is a Very Good Idea since copying around massive structs is a common Rust pitfall and helps both improve performance and memory use. No objections there!However, this broke my build of buck2 when using Nix in buck2-nix. In short the error is obtuse and looks like this, but I'm afraid I'm stuck at this point:
I believe this is due to the fact that the
tests/single-include
subdirectory ofprost
makes a reference to../..
in order to find theprost
package itself, since it's all part of a monorepo. But this won't work in Nix (usingbuildRustPackage
), because it makes the build fully hermetic -- so such "outside project references" to other things are made invalid. There are some other packages that suffer from similar issues.The normal version of
prost
works because the packages are downloaded fromcrates.io
, so there is no git repo/monorepo involved at all, in that case.At the moment, I can instead just manually revert the boxing patch, and thus also revert the changes to
Cargo.toml
, and that's what I've done, but it continues to get increasingly fiddly with every passing day (or week) and has some annoying edge cases in my build scripts to make it work.Please note this is roughly stuck, I'm just filing to keep people in the loop; as of right now, this depends on tokio-rs/prost#802 and then hyperium/tonic#1252. Once the
prost
package has been updated (at minimum) I believe I will be able to work around the rest.The text was updated successfully, but these errors were encountered: