fix(nibiru-std-proto-buf): sign mode proto clean script #113
Labels
scope: scripts
Scope in the conventional commit sense is a noun describing the section of the codebase.
type: bug/fix
A pull request that fixes someting (pull) OR a ticket that highlights a bug (issue).
Context/Abstract
Non-critical error when running
cargo run --bin proto_clean
inside the scripts directory:pub struct StakeAuthorization
andpub mod stake_authorization
in thecosmos.tx.signing.v1beta1.rs
file, and the error goes away.Underlying Issue
Problem 1: SignMode import broken
The error comes from this import of an enumeration in file
cosmos.tx.signing.v1beta1.rs
:Later on in the file,
SignMode
is defined:Problem 2: Validators type defined as both
struct
andenum
Ignoring the
SignMode
error results in a different problem.just fmt
cargo fmt --all
just clippy
cargo clippy --fix --allow-dirty --allow-staged
Checking nibiru-std v0.0.5 (/home/realu/warpath/NibiruChain/cw-nibiru/nibiru-std)
Checking bash-rs v0.1.0 (/home/realu/warpath/NibiruChain/cw-nibiru/packages/bash-rs)
Checking nibi-dev v0.1.0 (/home/realu/warpath/NibiruChain/cw-nibiru/packages/nibi-dev)
Checking cw3-flex-multisig v1.0.1 (/home/realu/warpath/NibiruChain/cw-nibiru/contracts/core-cw3-flex-msig)
Checking token-vesting v0.2.0 (/home/realu/warpath/NibiruChain/cw-nibiru/contracts/core-token-vesting)
Checking incentives v0.2.0 (/home/realu/warpath/NibiruChain/cw-nibiru/contracts/incentives)
Checking scripts v0.1.0 (/home/realu/warpath/NibiruChain/cw-nibiru/scripts)
error[E0428]: the name
Validators
is defined multiple times--> nibiru-std/src/proto/buf/cosmos.staking.v1beta1.rs:31:5
|
24 | pub struct Validators {
| --------------------- previous definition of the type
Validators
here...
31 | pub enum Validators {
| ^^^^^^^^^^^^^^^^^^^
Validators
redefined here|
= note:
Validators
must be defined only once in the type namespace of this modulewarning: using tabs in doc comments is not recommended
--> nibiru-std/src/proto/buf/nibiru.oracle.v1.rs:16:9
|
16 | /// μ := weightedMedian,
| ^^^^ help: consider using four spaces per tab
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments
= note:
#[warn(clippy::tabs_in_doc_comments)]
on by defaultwarning: using tabs in doc comments is not recommended
--> nibiru-std/src/proto/buf/nibiru.oracle.v1.rs:17:9
|
17 | /// validRange := μ ± (μ * rewardBand / 2),
| ^^^^ help: consider using four spaces per tab
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments
error[E0119]: conflicting implementations of trait
std::clone::Clone
for typeproto::cosmos::staking::v1beta1::stake_authorization::Validators
--> nibiru-std/src/proto/buf/cosmos.staking.v1beta1.rs:30:10
|
23 | #[derive(Clone, PartialEq, ::prost::Message)]
| ----- first implementation here
...
30 | #[derive(Clone, PartialEq, ::prost::Oneof)]
| ^^^^^ conflicting implementation for
proto::cosmos::staking::v1beta1::stake_authorization::Validators
|
= note: this error originates in the derive macro
Clone
(in Nightly builds, run with -Z macro-backtrace for more info)error[E0119]: conflicting implementations of trait
std::fmt::Debug
for typeproto::cosmos::staking::v1beta1::stake_authorization::Validators
--> nibiru-std/src/proto/buf/cosmos.staking.v1beta1.rs:30:28
|
23 | #[derive(Clone, PartialEq, ::prost::Message)]
| ---------------- first implementation here
...
30 | #[derive(Clone, PartialEq, ::prost::Oneof)]
| ^^^^^^^^^^^^^^ conflicting implementation for
proto::cosmos::staking::v1beta1::stake_authorization::Validators
|
= note: this error originates in the derive macro
::prost::Oneof
(in Nightly builds, run with -Z macro-backtrace for more info)error[E0119]: conflicting implementations of trait
std::marker::StructuralPartialEq
for typeproto::cosmos::staking::v1beta1::stake_authorization::Validators
--> nibiru-std/src/proto/buf/cosmos.staking.v1beta1.rs:30:17
|
23 | #[derive(Clone, PartialEq, ::prost::Message)]
| --------- first implementation here
...
30 | #[derive(Clone, PartialEq, ::prost::Oneof)]
| ^^^^^^^^^ conflicting implementation for
proto::cosmos::staking::v1beta1::stake_authorization::Validators
|
= note: this error originates in the derive macro
PartialEq
(in Nightly builds, run with -Z macro-backtrace for more info)error[E0119]: conflicting implementations of trait
std::cmp::PartialEq
for typeproto::cosmos::staking::v1beta1::stake_authorization::Validators
--> nibiru-std/src/proto/buf/cosmos.staking.v1beta1.rs:30:17
|
23 | #[derive(Clone, PartialEq, ::prost::Message)]
| --------- first implementation here
...
30 | #[derive(Clone, PartialEq, ::prost::Oneof)]
| ^^^^^^^^^ conflicting implementation for
proto::cosmos::staking::v1beta1::stake_authorization::Validators
|
= note: this error originates in the derive macro
PartialEq
(in Nightly builds, run with -Z macro-backtrace for more info)Some errors have detailed explanations: E0119, E0428.
For more information about an error, try
rustc --explain E0119
.warning:
nibiru-std
(lib) generated 2 warningserror: could not compile
nibiru-std
(lib) due to 5 previous errors; 2 warnings emittedwarning: build failed, waiting for other jobs to finish...
error: Recipe
clippy
failed on line 54 with exit code 101error: Recipe
tidy
failed on line 84 with exit code 101The text was updated successfully, but these errors were encountered: