Page MenuHomePhabricator

[nix] Revert protoc-gen-grpc-web to 1.4.2 using overlay
ClosedPublic

Authored by will on Jan 18 2024, 10:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 3, 1:08 PM
Unknown Object (File)
Tue, Jul 2, 1:12 PM
Unknown Object (File)
Tue, Jul 2, 4:55 AM
Unknown Object (File)
Mon, Jul 1, 11:15 PM
Unknown Object (File)
Sat, Jun 29, 3:27 PM
Unknown Object (File)
Sun, Jun 23, 11:23 PM
Unknown Object (File)
Sun, Jun 23, 11:02 PM
Unknown Object (File)
Thu, Jun 20, 1:19 AM
Subscribers

Details

Summary

This creates an overlay with the last nixpkgs revision 9957cd48326fe8dbd52fdc50dd2502307f188b0d to have grpc-web version 1.4.2
and replaces the dev-shell installation which uses the latest nixpkgs-unstable grpc-web package.

Test Plan

Successfully ran nix develop and it installed 1.4.2 properly

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

will requested review of this revision.Jan 18 2024, 11:13 PM
varun requested changes to this revision.Jan 18 2024, 11:34 PM

Thanks for putting this out so quickly! Unfortunately, it seems like there's still a problem:

varun@varuns-MacBook-Pro web % yarn codegen-identity-grpc        
yarn run v1.22.19
$ ./scripts/codegen-identity-grpc.sh
/nix/store/7qj55bw020lvz0246lbz2ap7ji6sd275-protoc-gen-grpc-web-1.4.2/bin/protoc-gen-grpc-web: /nix/store/7qj55bw020lvz0246lbz2ap7ji6sd275-protoc-gen-grpc-web-1.4.2/bin/protoc-gen-grpc-web: cannot execute binary file
--grpc-web_out: protoc-gen-grpc-web: Plugin failed with status code 126.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I think the protoc-gen-grpc-web binary you added is compiled for a different architecture

This revision now requires changes to proceed.Jan 18 2024, 11:34 PM

After yarn arc-patching this diff:

varun@varuns-MacBook-Pro web % file /nix/store/7qj55bw020lvz0246lbz2ap7ji6sd275-protoc-gen-grpc-web-1.4.2/bin/protoc-gen-grpc-web
/nix/store/7qj55bw020lvz0246lbz2ap7ji6sd275-protoc-gen-grpc-web-1.4.2/bin/protoc-gen-grpc-web: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/ld-linux-x86-64.so.2, for GNU/Linux 3.10.0, not stripped

After checking out an old commit from before protoc-gen-grpc-web was upgraded to 1.5.0:

varun@varuns-MacBook-Pro web % file /nix/store/048hbnyjjg6r86k92nsbmvcq736bvn5k-protoc-gen-grpc-web-1.4.2/bin/protoc-gen-grpc-web
/nix/store/048hbnyjjg6r86k92nsbmvcq736bvn5k-protoc-gen-grpc-web-1.4.2/bin/protoc-gen-grpc-web: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE>
flake.nix
18 ↗(On Diff #35867)

I think this should be arm64

flake.nix
18 ↗(On Diff #35867)

That was an oversight. I believe we're on aarch64-darwin

Switch to aarch64-darwin. Just ran the web protobuf gen script and everything seems to be working. Let me know if there's any other issues

This revision is now accepted and ready to land.Jan 19 2024, 12:21 PM