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

Replace default off-chain engine with experimental one, remove old one #1144

Merged
merged 11 commits into from
Mar 2, 2022
27 changes: 0 additions & 27 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,6 @@ test:
- cargo test --verbose --all-features --no-fail-fast --workspace
- cargo test --verbose --all-features --no-fail-fast --workspace --doc

# Just needed as long as we have the `ink-experimental-engine` feature.
# We do not invoke `--all-features` here -- this would imply the feature
# `ink-experimental-engine`. So in order to still run the tests without the
# experimental engine feature we need this command.
- cargo test --verbose --features std --no-fail-fast --workspace

docs:
stage: workspace
<<: *docker-env
Expand Down Expand Up @@ -318,11 +312,6 @@ codecov:
# RUSTFLAGS are the cause target cache can't be used here
- cargo build --verbose --all-features --workspace
- cargo test --verbose --all-features --no-fail-fast --workspace
# Just needed as long as we have the `ink-experimental-engine` feature.
# We must additionally run the coverage without `--all-features` here -- this
# would imply the feature `ink-experimental-engine`. So in order to still run
# the tests without the experimental engine feature we need this command.
- cargo test --verbose --features std --no-fail-fast --workspace
# coverage with branches
- grcov . --binary-path ./target/debug/ --source-dir . --output-type lcov --llvm --branch
--ignore-not-existing --ignore "/*" --ignore "tests/*" --output-path lcov-w-branch.info
Expand Down Expand Up @@ -352,22 +341,6 @@ examples-test:
cargo test --verbose --manifest-path examples/delegator/${contract}/Cargo.toml;
done

examples-test-experimental-engine:
stage: examples
<<: *docker-env
<<: *test-refs
needs:
- job: clippy-std
artifacts: false
script:
# We test only the examples for which the tests have already been migrated to
# use the experimental engine.
- cargo test --no-default-features --features std, ink-experimental-engine --verbose --manifest-path examples/erc20/Cargo.toml
- cargo test --no-default-features --features std, ink-experimental-engine --verbose --manifest-path examples/erc1155/Cargo.toml
- cargo test --no-default-features --features std, ink-experimental-engine --verbose --manifest-path examples/contract-terminate/Cargo.toml
- cargo test --no-default-features --features std, ink-experimental-engine --verbose --manifest-path examples/contract-transfer/Cargo.toml


examples-contract-build:
stage: examples
<<: *docker-env
Expand Down
2 changes: 1 addition & 1 deletion crates/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"
repository = "https://github.com/paritytech/ink"
documentation = "https://docs.rs/ink_engine/"
homepage = "https://www.parity.io/"
description = "[ink!] Experimental off-chain environment for testing."
description = "[ink!] Off-chain environment for testing."
keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"]
categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
Expand Down
2 changes: 1 addition & 1 deletion crates/env/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ std = [
"ink_allocator/std",
"ink_prelude/std",
"ink_primitives/std",
"ink_engine/std",
"scale/std",
"scale-info/std",
"secp256k1",
Expand All @@ -69,5 +70,4 @@ std = [
]
# Enable contract debug messages via `debug_print!` and `debug_println!`.
ink-debug = []
ink-experimental-engine = ["ink_engine"]
wee-alloc = ["ink_allocator/wee-alloc"]
2 changes: 1 addition & 1 deletion crates/env/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl ReturnFlags {
}

/// Returns the underlying `u32` representation.
#[cfg(not(feature = "ink-experimental-engine"))]
#[cfg(not(feature = "std"))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this need to be behind a feature flag?

Copy link
Collaborator Author

@cmichi cmichi Mar 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In std the function is never used, clippy fails in std otherwise.

pub(crate) fn into_u32(self) -> u32 {
self.value
}
Expand Down
Loading