-
Notifications
You must be signed in to change notification settings - Fork 262
chore(hermes): Remove git from build, vendor WH & Google protos #2097
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
To be honest, we probably open sourced way too much of this (basically by | ||
accident). There are a couple files in here you are most likely to be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lmaoo
apps/hermes/server/.gitignore
Outdated
@@ -7,4 +7,6 @@ src/network/p2p.proto | |||
tools/ | |||
|
|||
# Ignore Wormhole cloned repo | |||
# (Legacy -- we no longer clone the Wormhole repo, the proto files are included in this project under `proto/vendor`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove it entirely.
.pre-commit-config.yaml
Outdated
(?x)^( | ||
target_chains/sui/vendor/| | ||
patches/| | ||
apps/hermes/server/proto/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably make it /proto/vendor
The Hermes
build.rs
currently pulls the wormhole and googleapis git repositories in order to get the WH protobuf definitions. (The WH protos depend on googleapi protos, so those are downloaded as well.)Aside from a slow build, this causes some issues with LSP. TLDR: The build doesn't clean up the .git lock which breaks incremental builds, since subsequent builds fail to
git init
. On my machine, this manifests ascargo watch
andrust-analyzer
not working since they continuously and incrementally build.Talking to @ali-bahjati , we concluded that vendoring in the required protobufs is preferable to constantly downloading them from git, which is what this PR does.
Both repos are Apache 2.0 licensed (as are we) so we should be good to include them directly.
The build is much faster now :)
Notes:
service.proto
. This works fine as the WH protos only depend on a select few google ones.