Substrate type inference regression bug
TriplEight opened this issue · 5 comments
TriplEight commented
I'm unable to install canvas-node
to contracts CI image here.
And the error is:
error[E0282]: type annotations needed
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9
|
541 | let accuracy = P::ACCURACY.saturated_into();
| ^^^^^^^^ consider giving `accuracy` a type
...
1595 | / implement_fixed!(
1596 | | FixedI64,
1597 | | test_fixed_i64,
1598 | | i64,
... |
1601 | | "_Fixed Point 64 bits signed, range = [-9223372036.854775808, 9223372036.854775807]_",
1602 | | );
| |__- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0282]: type annotations needed
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9
|
541 | let accuracy = P::ACCURACY.saturated_into();
| ^^^^^^^^ consider giving `accuracy` a type
...
1604 | / implement_fixed!(
1605 | | FixedI128,
1606 | | test_fixed_i128,
1607 | | i128,
... |
1611 | | [-170141183460469231731.687303715884105728, 170141183460469231731.687303715884105727]_",
1612 | | );
| |__- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0282]: type annotations needed
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9
|
541 | let accuracy = P::ACCURACY.saturated_into();
| ^^^^^^^^ consider giving `accuracy` a type
...
1614 | / implement_fixed!(
1615 | | FixedU128,
1616 | | test_fixed_u128,
1617 | | u128,
... |
1621 | | [0.000000000000000000, 340282366920938463463.374607431768211455]_",
1622 | | );
| |__- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0282`.
error: could not compile `sp-arithmetic`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `canvas-node v0.1.0 (https://github.com/paritytech/canvas-node?tag=v0.1.2#50143553)`, intermediate artifacts can be found at `/tmp/cargo-install6UH3ra`
Caused by:
build failed
error building at STEP "RUN set -eux; echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list; echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" > /etc/apt/sources.list.d/llvm.list; echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" >> /etc/apt/sources.list.d/llvm.list; apt-get -y update; apt-get remove -y --purge clang; apt-get install -y --no-install-recommends llvm-8-dev clang-8 zlib1g-dev npm yarn wabt unzip; update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 100; update-alternatives --install /usr/bin/cc cc /usr/bin/clang-8 100; rustup toolchain install nightly --target wasm32-unknown-unknown --profile minimal --component rustfmt rust-src; rustup default nightly; cargo install pwasm-utils-cli --bin wasm-prune; cargo install cargo-contract; cargo install --git https://github.com/hyperledger-labs/solang --tag m7; cargo install --git https://github.com/paritytech/canvas-node --tag v0.1.2; yarn --version; rustup show; cargo --version; solang --version; rm -rf "${CARGO_HOME}/registry" "${CARGO_HOME}/git" /root/.cache/sccache; apt-get autoremove -y; apt-get clean; rm -rf /var/lib/apt/lists/*": error while running runtime: exit status 101
TriplEight commented
please do a new tag after the fix
ascjones commented
With your scheduled build https://github.com/paritytech/devops/issues/676#issuecomment-722450793 we now need to get hold of that binary and put in the $PATH
in the contracts CI image. Then we can remove the installation step here.
TriplEight commented
Certainly, but this PR has to be merged first #22 ;)
ascjones commented
This is blocked waiting for a new version of substrate to be deployed to crates.io
. The current version 2.0.0
is broken with nightly toolchains > 2020-10-01
, see paritytech/substrate#7287
ascjones commented
Currently depending on a substrate master (to a specific commit in the lockfile), so currently canvas-node
builds with the latest nightly.