Browse Source

Merge pull request #2858 from mnaamani/master-rollback-nightly-2021-02-20

rollback to rust nightly-2021-02-20
shamil-gadelshin 3 years ago
parent
commit
14bcbae4b8

+ 1 - 1
README.md

@@ -89,7 +89,7 @@ You can also run your our own joystream-node:
 
 
 ```sh
 ```sh
 git checkout master
 git checkout master
-WASM_BUILD_TOOLCHAIN=nightly-2021-03-24 cargo build --release
+WASM_BUILD_TOOLCHAIN=nightly-2021-02-20 cargo +nightly-2021-02-20 build --release
 ./target/release/joystream-node -- --pruning archive --chain testnets/joy-testnet-5.json
 ./target/release/joystream-node -- --pruning archive --chain testnets/joy-testnet-5.json
 ```
 ```
 
 

+ 3 - 3
devops/git-hooks/pre-push

@@ -1,13 +1,13 @@
 #!/bin/sh
 #!/bin/sh
 set -e
 set -e
 
 
-export WASM_BUILD_TOOLCHAIN=nightly-2021-03-24
+export WASM_BUILD_TOOLCHAIN=nightly-2021-02-20
 
 
 echo 'running clippy (rust linter)'
 echo 'running clippy (rust linter)'
 # When custom build.rs triggers wasm-build-runner-impl to build we get error:
 # When custom build.rs triggers wasm-build-runner-impl to build we get error:
 # "Rust WASM toolchain not installed, please install it!"
 # "Rust WASM toolchain not installed, please install it!"
 # So we skip building the WASM binary by setting BUILD_DUMMY_WASM_BINARY=1
 # So we skip building the WASM binary by setting BUILD_DUMMY_WASM_BINARY=1
-BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings
+BUILD_DUMMY_WASM_BINARY=1 cargo +nightly-2021-02-20 clippy --release --all -- -D warnings
 
 
 echo 'running cargo unit tests'
 echo 'running cargo unit tests'
-cargo test --release --all
+cargo +nightly-2021-02-20 test --release --all

+ 5 - 5
joystream-node-armv7.Dockerfile

@@ -1,9 +1,9 @@
 FROM rust:1.52.1-buster AS rust
 FROM rust:1.52.1-buster AS rust
 RUN rustup self update
 RUN rustup self update
-RUN rustup install nightly-2021-03-24 --force
-RUN rustup default nightly-2021-03-24
-RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-24
-RUN rustup component add --toolchain nightly-2021-03-24 clippy
+RUN rustup install nightly-2021-02-20 --force
+RUN rustup default nightly-2021-02-20
+RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2021-02-20
+RUN rustup component add --toolchain nightly-2021-02-20 clippy
 RUN apt-get update && \
 RUN apt-get update && \
   apt-get install -y curl git gcc xz-utils sudo pkg-config unzip clang llvm libc6-dev
   apt-get install -y curl git gcc xz-utils sudo pkg-config unzip clang llvm libc6-dev
 
 
@@ -14,7 +14,7 @@ COPY . /joystream
 
 
 # Build all cargo crates
 # Build all cargo crates
 # Ensure our tests and linter pass before actual build
 # Ensure our tests and linter pass before actual build
-ENV WASM_BUILD_TOOLCHAIN=nightly-2021-03-24
+ENV WASM_BUILD_TOOLCHAIN=nightly-2021-02-20
 RUN apt-get install -y libprotobuf-dev protobuf-compiler
 RUN apt-get install -y libprotobuf-dev protobuf-compiler
 RUN BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings && \
 RUN BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings && \
     cargo test --release --all && \
     cargo test --release --all && \

+ 5 - 5
joystream-node.Dockerfile

@@ -1,9 +1,9 @@
 FROM rust:1.52.1-buster AS rust
 FROM rust:1.52.1-buster AS rust
 RUN rustup self update
 RUN rustup self update
-RUN rustup install nightly-2021-03-24 --force
-RUN rustup default nightly-2021-03-24
-RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-24
-RUN rustup component add --toolchain nightly-2021-03-24 clippy
+RUN rustup install nightly-2021-02-20 --force
+RUN rustup default nightly-2021-02-20
+RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2021-02-20
+RUN rustup component add --toolchain nightly-2021-02-20 clippy
 RUN apt-get update && \
 RUN apt-get update && \
   apt-get install -y curl git gcc xz-utils sudo pkg-config unzip clang llvm libc6-dev
   apt-get install -y curl git gcc xz-utils sudo pkg-config unzip clang llvm libc6-dev
 
 
@@ -14,7 +14,7 @@ COPY . /joystream
 
 
 # Build all cargo crates
 # Build all cargo crates
 # Ensure our tests and linter pass before actual build
 # Ensure our tests and linter pass before actual build
-ENV WASM_BUILD_TOOLCHAIN=nightly-2021-03-24
+ENV WASM_BUILD_TOOLCHAIN=nightly-2021-02-20
 RUN BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings && \
 RUN BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings && \
     cargo test --release --all && \
     cargo test --release --all && \
     cargo build --release
     cargo build --release

+ 2 - 2
node/README.md

@@ -26,7 +26,7 @@ cd joystream/
 Compile the node and runtime:
 Compile the node and runtime:
 
 
 ```bash
 ```bash
-WASM_BUILD_TOOLCHAIN=nightly-2021-03-24 cargo build --release
+WASM_BUILD_TOOLCHAIN=nightly-2021-02-20 cargo +nightly-2021-02-20 build --release
 ```
 ```
 
 
 This produces the binary in `./target/release/joystream-node`
 This produces the binary in `./target/release/joystream-node`
@@ -79,7 +79,7 @@ If you are building a tagged release from `master` branch and want to install th
 This will install the executable `joystream-node` to your `~/.cargo/bin` folder, which you would normally have in your `$PATH` environment.
 This will install the executable `joystream-node` to your `~/.cargo/bin` folder, which you would normally have in your `$PATH` environment.
 
 
 ```bash
 ```bash
-WASM_BUILD_TOOLCHAIN=nightly-2021-03-24 cargo install joystream-node --path node/ --locked
+WASM_BUILD_TOOLCHAIN=nightly-2021-02-20 cargo +nightly-2021-02-20 install joystream-node --path node/ --locked
 ```
 ```
 
 
 Now you can run and connect to the testnet:
 Now you can run and connect to the testnet:

+ 2 - 0
runtime-modules/storage/src/lib.rs

@@ -25,6 +25,8 @@ pub(crate) type ContentId<T> = <T as common::StorageOwnership>::ContentId;
 pub(crate) type ChannelId<T> = <T as common::StorageOwnership>::ChannelId;
 pub(crate) type ChannelId<T> = <T as common::StorageOwnership>::ChannelId;
 
 
 // Alias for the dao id.
 // Alias for the dao id.
+// Allow DAOId alias to avoid breaking api/types names
+#[allow(clippy::upper_case_acronyms)]
 pub(crate) type DAOId<T> = <T as common::StorageOwnership>::DAOId;
 pub(crate) type DAOId<T> = <T as common::StorageOwnership>::DAOId;
 
 
 /// DAO object type id.
 /// DAO object type id.

+ 2 - 0
runtime/src/primitives.rs

@@ -15,6 +15,8 @@ pub type TransactionPriority = u64;
 pub type ContentId = sp_core::H256;
 pub type ContentId = sp_core::H256;
 
 
 /// Alias for DAOId, used in various places.
 /// Alias for DAOId, used in various places.
+// Allow DAOId alias to avoid breaking api/types names
+#[allow(clippy::upper_case_acronyms)]
 pub type DAOId = u64;
 pub type DAOId = u64;
 
 
 /// Alias for DataObjectTypeId, used in various places.
 /// Alias for DataObjectTypeId, used in various places.

+ 2 - 2
scripts/cargo-build.sh

@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
 #!/usr/bin/env bash
 
 
-export WASM_BUILD_TOOLCHAIN=nightly-2021-03-24
+export WASM_BUILD_TOOLCHAIN=nightly-2021-02-20
 
 
-cargo build --release
+cargo +nightly-2021-02-20 build --release

+ 2 - 2
scripts/cargo-tests-with-networking.sh

@@ -1,7 +1,7 @@
 #!/bin/sh
 #!/bin/sh
 set -e
 set -e
 
 
-export WASM_BUILD_TOOLCHAIN=nightly-2021-03-24
+export WASM_BUILD_TOOLCHAIN=nightly-2021-02-20
 
 
 echo 'running all cargo tests'
 echo 'running all cargo tests'
-cargo test --release --all -- --ignored
+cargo +nightly-2021-02-20 test --release --all -- --ignored

+ 1 - 1
scripts/raspberry-cross-build.sh

@@ -9,7 +9,7 @@
 export WORKSPACE_ROOT=`cargo metadata --offline --no-deps --format-version 1 | jq .workspace_root -r`
 export WORKSPACE_ROOT=`cargo metadata --offline --no-deps --format-version 1 | jq .workspace_root -r`
 
 
 docker run \
 docker run \
-    -e WASM_BUILD_TOOLCHAIN=nightly-2021-03-24 \
+    -e WASM_BUILD_TOOLCHAIN=nightly-2021-02-20 \
     --volume ${WORKSPACE_ROOT}/:/home/cross/project \
     --volume ${WORKSPACE_ROOT}/:/home/cross/project \
     --volume ${HOME}/.cargo/registry:/home/cross/.cargo/registry \
     --volume ${HOME}/.cargo/registry:/home/cross/.cargo/registry \
     joystream/rust-raspberry \
     joystream/rust-raspberry \

+ 4 - 4
scripts/run-dev-chain.sh

@@ -1,13 +1,13 @@
 #!/usr/bin/env bash
 #!/usr/bin/env bash
 
 
-export WASM_BUILD_TOOLCHAIN=nightly-2021-03-24
+export WASM_BUILD_TOOLCHAIN=nightly-2021-02-20
 
 
 # Build release binary
 # Build release binary
-cargo build --release
+cargo +nightly-2021-02-20 build --release
 
 
 # Purge existing local chain
 # Purge existing local chain
-yes | cargo run --release -- purge-chain --dev
+yes | cargo +nightly-2021-02-20 run --release -- purge-chain --dev
 
 
 # Run local development chain -
 # Run local development chain -
 # No need to specify `-p joystream-node` it is the default bin crate in the cargo workspace
 # No need to specify `-p joystream-node` it is the default bin crate in the cargo workspace
-cargo run --release -- --dev
+cargo +nightly-2021-02-20 run --release -- --dev

+ 2 - 4
setup.sh

@@ -29,10 +29,8 @@ curl https://getsubstrate.io -sSf | bash -s -- --fast
 
 
 source ~/.cargo/env
 source ~/.cargo/env
 
 
-rustup install nightly-2021-03-24
-rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-24
-
-rustup default nightly-2021-03-24
+rustup install nightly-2021-02-20
+rustup target add wasm32-unknown-unknown --toolchain nightly-2021-02-20
 
 
 rustup component add rustfmt clippy
 rustup component add rustfmt clippy