Skip to content
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

Fix ibc-proto recompilation bug #802

Merged
merged 5 commits into from
Apr 7, 2021
Merged

Fix ibc-proto recompilation bug #802

merged 5 commits into from
Apr 7, 2021

Conversation

adizere
Copy link
Member

@adizere adizere commented Apr 6, 2021

Closes: cosmos/ibc-proto-rs#11

Description

Added a safety check to prevent overwriting of cosmos-related files.

The problem is described here: https://github.com/informalsystems/ibc-rs/issues/801#issuecomment-814268643

Solution:

  1. introduced separate directories for compiling the SDK files and the IBC-go files, respectively
  2. when copying the generated Rust files into ../proto/..., added a safety check to prevent overwriting of cosmos.* files
    • if two identical cosmos.* files are generated, only the original (from SDK) is retained
    • the following warning is emitted in this case:

[warn ] Cosmos-related file exists already ../proto/src/prost/cosmos.upgrade.v1beta1.rs! Ignoring the one generated from IBC-go "/var/folders/sy/207jjj5d7j138ryjs32nbxk00000gn/T/ibc-proto-ibc-go.vsPlSpTwK1aO/cosmos.upgrade.v1beta1.rs"


For contributor use:

  • Updated the Unreleased section of CHANGELOG.md with the issue.
  • If applicable: Unit tests written, added test to CI.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments.
  • Re-reviewed Files changed in the Github PR explorer.

@adizere adizere requested review from ancazamfir and romac as code owners April 6, 2021 18:59
@romac romac changed the title Fox ibc-proto recompilation bug Fix ibc-proto recompilation bug Apr 7, 2021
@romac
Copy link
Member

romac commented Apr 7, 2021

Pushed a couple commits to fix an issue with the Git clone and a typo, looks good otherwise :)

@adizere adizere merged commit cabefe3 into master Apr 7, 2021
@adizere adizere deleted the adi/801_proto_bug branch April 7, 2021 15:21
romac added a commit that referenced this pull request Apr 7, 2021
* Fixed overwritten cosmos files

* changelog

* Fix typo in proto-compiler README

* Fix bug where proto-compiler didn't find SDK repo if already cloned

Co-authored-by: Romain Ruetschi <romain@informal.systems>
romac added a commit that referenced this pull request Apr 7, 2021
* Remove light client commands and configuration

* Remove light client init code in scripts

* Update the changelog

* Use rpc_timeout field from chain config

* Update config files and ADRs

* Add --locked flag when compiling hermes in init-clients

* Fix ibc-proto recompilation bug (#802)

* Fixed overwritten cosmos files

* changelog

* Fix typo in proto-compiler README

* Fix bug where proto-compiler didn't find SDK repo if already cloned

Co-authored-by: Romain Ruetschi <romain@informal.systems>

* Add option to specify which events to listen for in `listen` command (#804)

* Update config_example.toml

* Rename init-clients to init-hermes

Co-authored-by: Adi Seredinschi <adi@informal.systems>
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
* Fixed overwritten cosmos files

* changelog

* Fix typo in proto-compiler README

* Fix bug where proto-compiler didn't find SDK repo if already cloned

Co-authored-by: Romain Ruetschi <romain@informal.systems>
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
* Remove light client commands and configuration

* Remove light client init code in scripts

* Update the changelog

* Use rpc_timeout field from chain config

* Update config files and ADRs

* Add --locked flag when compiling hermes in init-clients

* Fix ibc-proto recompilation bug (informalsystems#802)

* Fixed overwritten cosmos files

* changelog

* Fix typo in proto-compiler README

* Fix bug where proto-compiler didn't find SDK repo if already cloned

Co-authored-by: Romain Ruetschi <romain@informal.systems>

* Add option to specify which events to listen for in `listen` command (informalsystems#804)

* Update config_example.toml

* Rename init-clients to init-hermes

Co-authored-by: Adi Seredinschi <adi@informal.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants