Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add
--build-tonic
flag to proto-compiler, sync protobuf script, and generate protobuf for std and no_std mode #1439Add
--build-tonic
flag to proto-compiler, sync protobuf script, and generate protobuf for std and no_std mode #1439Changes from 1 commit
1129c43
f97cbe8
3f19db3
494e31f
effa521
0573553
230614d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This comment was marked as outdated.
Sorry, something went wrong.
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.
Ah, I've read further to understand that these are just mirrors and they are fetched from the remote every time the script is invoked. Still, the point about trusting well-known file paths in
/tmp
stands. Maybe mirror these repos under${XDG_CACHE_HOME:-$HOME/.cache}/ibc-rs.build
?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.
That could work as well. Compared to the original, we want to use a local git bare repository as cache instead of trying to clone the entire remote repository every time the command is run.
Right now I still have the problem that if a bare repository has already been cloned before, I can't find simple way to update it other than having to reclone the entire bare repository. So it is still a little problematic to set a persistent location at
$HOME
by default.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.
Use of non-randomized paths in
/tmp
also assumes that only a single user will ever run this script (over the host's uptime before/tmp
is cleared). This is probably OK for a typical developer's workstation, but using a location at$HOME
by convention gives you better isolation.I've tried locally and
git fetch
orgit fetch origin
seem to work. What's the problem?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.
Hmm I might have cloned the bare repository inappropriately. That seems to work now!
I have updated the script as you suggested. It stores the git cache at
~/.cache/cosmos
.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.
This might conceivably clash with some Cosmos client in the future (or just an unrelated app named
cosmos
), I'd rather use something identifying the ibc-rs build scripts as the well-known directory under~/.cache
and put everything cached by the scripts in there. But this is mostly pedantry, thanks for fixing the main issue.