Page MenuHomePhabricator

[web] Add protoc-gen-js dependency
ClosedPublic

Authored by ashoat on Oct 13 2023, 12:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 1:31 AM
Unknown Object (File)
Mon, Nov 11, 5:45 PM
Unknown Object (File)
Mon, Nov 11, 5:03 AM
Unknown Object (File)
Thu, Nov 7, 7:07 AM
Unknown Object (File)
Thu, Nov 7, 3:05 AM
Unknown Object (File)
Sun, Nov 3, 5:34 PM
Unknown Object (File)
Mon, Oct 28, 2:10 PM
Unknown Object (File)
Mon, Oct 28, 2:10 PM
Subscribers

Details

Summary

This is an addon to protoc that is necessary in order to run the script in the next diff. It's not usually packaged as an NPM package - context here.

The protoc in my local install has this addon already, which is why I didn't seem to need this change in my previous work in D7306. But the protoc in Nix doesn't seem to have this for some reason.

We could probably bring this in via Nix instead. I'm open to that if people prefer.

Test Plan

Without this diff, the script in the following diff fails with the following error:

yarn run v1.22.19
$ ./scripts/codegen-identity-grpc.sh
protoc-gen-js: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--js_out: protoc-gen-js: Plugin failed with status code 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

After introducing the protoc-gen-js dependency, the script no longer errors.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I'd prefer to bring this in through Nix. if we need to upgrade protoc + protoc-gen-js in the future, it'll be easier if they're in the same place

This revision is now accepted and ready to land.Oct 13 2023, 1:39 PM

I checked nixpkgs and I couldn't find protoc-gen-js in the repo:

Screenshot 2023-10-17 at 8.56.29 AM.png (1×530 px, 114 KB)

I also searched for protobuf-javascript, which is where protoc-gen-js is supposed to be packaged based on the NPM package description, but couldn't find that either.

The closest I could find is this pull request for protoc-gen-es, which seems to be an alternate implementation. The PR has not been merged yet.

This revision was automatically updated to reflect the committed changes.