diff --git a/polkadot/.gitlab-ci.yml b/polkadot/.gitlab-ci.yml index 7d7d9e7cbd..61c6f0ce87 100644 --- a/polkadot/.gitlab-ci.yml +++ b/polkadot/.gitlab-ci.yml @@ -29,7 +29,8 @@ variables: GIT_STRATEGY: fetch GIT_DEPTH: 100 CI_SERVER_NAME: "GitLab CI" - CI_IMAGE: "paritytech/ci-linux:production" + # change to production when this image is published + CI_IMAGE: "paritytech/ci-linux:staging@sha256:2c90b67f1452ed2d7236c2cd13f6224053a833d521b3630650b679f00874e0a9" DOCKER_OS: "debian:stretch" ARCH: "x86_64" ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.25" diff --git a/polkadot/node/orchestra/tests/ui/err-01-duplicate-consumer.stderr b/polkadot/node/orchestra/tests/ui/err-01-duplicate-consumer.stderr index cd117ebd72..af27b95a2e 100644 --- a/polkadot/node/orchestra/tests/ui/err-01-duplicate-consumer.stderr +++ b/polkadot/node/orchestra/tests/ui/err-01-duplicate-consumer.stderr @@ -1,21 +1,21 @@ -error[E0119]: conflicting implementations of trait `orchestra::SubsystemSender` for type `OrchestraSubsystemSender` - --> tests/ui/err-01-duplicate-consumer.rs:19:1 - | -19 | #[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | first implementation here - | conflicting implementation for `OrchestraSubsystemSender` - | - = note: this error originates in the attribute macro `orchestra` (in Nightly builds, run with -Z macro-backtrace for more info) - error[E0119]: conflicting implementations of trait `std::convert::From` for type `AllMessages` --> tests/ui/err-01-duplicate-consumer.rs:19:1 | 19 | #[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | first implementation here | conflicting implementation for `AllMessages` | = note: this error originates in the attribute macro `orchestra` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0119]: conflicting implementations of trait `AssociateOutgoing` for type `MsgStrukt` + --> tests/ui/err-01-duplicate-consumer.rs:19:1 + | +19 | #[orchestra(signal=SigSigSig, event=Event, gen=AllMessages, error=OrchestraError)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | | + | first implementation here + | conflicting implementation for `MsgStrukt` + | + = note: this error originates in the attribute macro `orchestra` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/polkadot/node/orchestra/tests/ui/err-02-enum.stderr b/polkadot/node/orchestra/tests/ui/err-02-enum.stderr index d83aab2ea2..4694f5db97 100644 --- a/polkadot/node/orchestra/tests/ui/err-02-enum.stderr +++ b/polkadot/node/orchestra/tests/ui/err-02-enum.stderr @@ -1,11 +1,11 @@ error: expected `struct` - --> $DIR/err-02-enum.rs:16:1 + --> tests/ui/err-02-enum.rs:16:1 | 16 | enum Orchestra { | ^^^^ error[E0433]: failed to resolve: use of undeclared type `Orchestra` - --> $DIR/err-02-enum.rs:27:17 + --> tests/ui/err-02-enum.rs:27:18 | 27 | let orchestra = Orchestra::<_,_>::builder() - | ^^^^^^^^ use of undeclared type `Orchestra` + | ^^^^^^^^^ use of undeclared type `Orchestra` diff --git a/polkadot/node/orchestra/tests/ui/err-03-subsys-twice.stderr b/polkadot/node/orchestra/tests/ui/err-03-subsys-twice.stderr index 3fb97a88d7..de69031b24 100644 --- a/polkadot/node/orchestra/tests/ui/err-03-subsys-twice.stderr +++ b/polkadot/node/orchestra/tests/ui/err-03-subsys-twice.stderr @@ -1,17 +1,17 @@ -error: Duplicate subsystem names `AwesomeSubSys` - --> $DIR/err-03-subsys-twice.rs:25:8 +error: Duplicate subsystem names + --> tests/ui/err-03-subsys-twice.rs:25:8 | 25 | sub1: AwesomeSubSys, | ^^^^^^^^^^^^^ error: previously defined here. - --> $DIR/err-03-subsys-twice.rs:22:8 + --> tests/ui/err-03-subsys-twice.rs:22:8 | 22 | sub0: AwesomeSubSys, | ^^^^^^^^^^^^^ error[E0433]: failed to resolve: use of undeclared type `Orchestra` - --> $DIR/err-03-subsys-twice.rs:34:17 + --> tests/ui/err-03-subsys-twice.rs:34:18 | 34 | let orchestra = Orchestra::<_,_>::builder() - | ^^^^^^^^ use of undeclared type `Orchestra` + | ^^^^^^^^^ use of undeclared type `Orchestra` diff --git a/polkadot/node/orchestra/tests/ui/err-04-missing-error.stderr b/polkadot/node/orchestra/tests/ui/err-04-missing-error.stderr index 7b7dc015ea..70c3e790ea 100644 --- a/polkadot/node/orchestra/tests/ui/err-04-missing-error.stderr +++ b/polkadot/node/orchestra/tests/ui/err-04-missing-error.stderr @@ -1,13 +1,13 @@ error: Must declare the orchestra error type via `error=..`. - --> $DIR/err-04-missing-error.rs:16:1 + --> tests/ui/err-04-missing-error.rs:16:1 | 16 | #[orchestra(signal=SigSigSig, event=Event, gen=AllMessages)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in the attribute macro `orchestra` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0433]: failed to resolve: use of undeclared type `Orchestra` - --> $DIR/err-04-missing-error.rs:30:10 + --> tests/ui/err-04-missing-error.rs:30:10 | 30 | let _ = Orchestra::builder() - | ^^^^^^^^ use of undeclared type `Orchestra` + | ^^^^^^^^^ use of undeclared type `Orchestra` diff --git a/polkadot/node/orchestra/tests/ui/err-05-missing-field.stderr b/polkadot/node/orchestra/tests/ui/err-05-missing-field.stderr index 76f4f1107f..84778a4275 100644 --- a/polkadot/node/orchestra/tests/ui/err-05-missing-field.stderr +++ b/polkadot/node/orchestra/tests/ui/err-05-missing-field.stderr @@ -2,14 +2,10 @@ error[E0599]: no method named `build` found for struct `OrchestraBuilder tests/ui/err-05-missing-field.rs:59:4 | 22 | #[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] - | -------------------------------------------------------------------------------- method `build` not found for this + | ---------------------------------------------------------------------------------- method `build` not found for this struct ... 59 | .build() | ^^^^^ method not found in `OrchestraBuilder, Init, Missing>` | = note: the method was found for - `OrchestraBuilder, Init, Init>` - = help: items from traits can only be used if the trait is implemented and in scope - = note: the following traits define an item `build`, perhaps you need to implement one of them: - candidate #1: `frame_support::traits::hooks::GenesisBuild` - candidate #2: `prometheus::vec::MetricVecBuilder` diff --git a/polkadot/node/orchestra/tests/ui/err-06-missing-subsystem.stderr b/polkadot/node/orchestra/tests/ui/err-06-missing-subsystem.stderr index 3052464e0c..767d7feae3 100644 --- a/polkadot/node/orchestra/tests/ui/err-06-missing-subsystem.stderr +++ b/polkadot/node/orchestra/tests/ui/err-06-missing-subsystem.stderr @@ -2,14 +2,10 @@ error[E0599]: no method named `build` found for struct `OrchestraBuilder tests/ui/err-06-missing-subsystem.rs:59:4 | 22 | #[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] - | -------------------------------------------------------------------------------- method `build` not found for this + | ---------------------------------------------------------------------------------- method `build` not found for this struct ... 59 | .build() | ^^^^^ method not found in `OrchestraBuilder, Missing<_>, Init>` | = note: the method was found for - `OrchestraBuilder, Init, Init>` - = help: items from traits can only be used if the trait is implemented and in scope - = note: the following traits define an item `build`, perhaps you need to implement one of them: - candidate #1: `frame_support::traits::hooks::GenesisBuild` - candidate #2: `prometheus::vec::MetricVecBuilder` diff --git a/polkadot/node/orchestra/tests/ui/err-07-missing-spawner.stderr b/polkadot/node/orchestra/tests/ui/err-07-missing-spawner.stderr index 932e6fa776..1b5fb5413c 100644 --- a/polkadot/node/orchestra/tests/ui/err-07-missing-spawner.stderr +++ b/polkadot/node/orchestra/tests/ui/err-07-missing-spawner.stderr @@ -2,14 +2,10 @@ error[E0599]: no method named `build` found for struct `OrchestraBuilder tests/ui/err-07-missing-spawner.rs:59:4 | 22 | #[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] - | -------------------------------------------------------------------------------- method `build` not found for this + | ---------------------------------------------------------------------------------- method `build` not found for this struct ... 59 | .build() | ^^^^^ method not found in `OrchestraBuilder, Init, Init>` | = note: the method was found for - `OrchestraBuilder, Init, Init>` - = help: items from traits can only be used if the trait is implemented and in scope - = note: the following traits define an item `build`, perhaps you need to implement one of them: - candidate #1: `frame_support::traits::hooks::GenesisBuild` - candidate #2: `prometheus::vec::MetricVecBuilder` diff --git a/polkadot/node/orchestra/tests/ui/err-08-duplicate-subsystem.stderr b/polkadot/node/orchestra/tests/ui/err-08-duplicate-subsystem.stderr index 9053c1e814..b95c0d0a7d 100644 --- a/polkadot/node/orchestra/tests/ui/err-08-duplicate-subsystem.stderr +++ b/polkadot/node/orchestra/tests/ui/err-08-duplicate-subsystem.stderr @@ -2,7 +2,7 @@ error[E0599]: no method named `sub0` found for struct `OrchestraBuilder tests/ui/err-08-duplicate-subsystem.rs:57:4 | 22 | #[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] - | -------------------------------------------------------------------------------- method `sub0` not found for this + | ---------------------------------------------------------------------------------- method `sub0` not found for this struct ... 57 | .sub0(AwesomeSubSys::default()) // Duplicate subsystem | ^^^^-------------------------- help: remove the arguments diff --git a/polkadot/node/orchestra/tests/ui/err-09-uninit_generic_baggage.stderr b/polkadot/node/orchestra/tests/ui/err-09-uninit_generic_baggage.stderr index f4b7137ad6..ef9743fcdf 100644 --- a/polkadot/node/orchestra/tests/ui/err-09-uninit_generic_baggage.stderr +++ b/polkadot/node/orchestra/tests/ui/err-09-uninit_generic_baggage.stderr @@ -2,14 +2,10 @@ error[E0599]: no method named `build` found for struct `OrchestraBuilder tests/ui/err-09-uninit_generic_baggage.rs:59:4 | 22 | #[orchestra(signal=SigSigSig, error=OrchestraError, event=Event, gen=AllMessages)] - | -------------------------------------------------------------------------------- method `build` not found for this + | ---------------------------------------------------------------------------------- method `build` not found for this struct ... 59 | .build() | ^^^^^ method not found in `OrchestraBuilder, Init, Missing<_>>` | = note: the method was found for - `OrchestraBuilder, Init, Init>` - = help: items from traits can only be used if the trait is implemented and in scope - = note: the following traits define an item `build`, perhaps you need to implement one of them: - candidate #1: `frame_support::traits::hooks::GenesisBuild` - candidate #2: `prometheus::vec::MetricVecBuilder` diff --git a/polkadot/node/orchestra/tests/ui/ok-01-wip.rs b/polkadot/node/orchestra/tests/ui/ok-01-wip.rs index 4efe75f29a..5a2fad4054 100644 --- a/polkadot/node/orchestra/tests/ui/ok-01-wip.rs +++ b/polkadot/node/orchestra/tests/ui/ok-01-wip.rs @@ -5,7 +5,6 @@ use orchestra::*; #[derive(Default)] struct AwesomeSubSysA; - impl ::orchestra::Subsystem, OrchestraError> for AwesomeSubSysA { fn start(self, _ctx: OrchestraSubsystemContext) -> SpawnedSubsystem { SpawnedSubsystem { name: "sub A", future: Box::pin(async move { Ok(()) }) } @@ -41,7 +40,7 @@ impl Spawner for DummySpawner { } #[derive(Default)] -struct AwesomeSubSysB; +pub struct AwesomeSubSysB; #[derive(Clone, Debug)] pub struct SigSigSig; diff --git a/polkadot/scripts/update-rust-stable.sh b/polkadot/scripts/update-rust-stable.sh index 4e24d6338d..6aae75d8cb 100755 --- a/polkadot/scripts/update-rust-stable.sh +++ b/polkadot/scripts/update-rust-stable.sh @@ -36,4 +36,4 @@ export TRYBUILD=overwrite # Run all the relevant UI tests # # Any new UI tests in different crates need to be added here as well. -rustup run $RUST_VERSION cargo test -p polkadot-overseer-gen ui +rustup run $RUST_VERSION cargo test -p orchestra ui