Skip to content

Commit

Permalink
Cargo bug workaround (#1564)
Browse files Browse the repository at this point in the history
* Remove mock feature
* Bump versions
* Script to publish runtime packages
* Merge branch 'staging' into wasm32_fix
  • Loading branch information
MaksymZavershynskyi authored and nearprotocol-bulldozer[bot] committed Oct 25, 2019
1 parent d9f44b2 commit 61248e3
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 41 deletions.
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion runtime/near-runtime-fees/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "near-runtime-fees"
version = "0.3.1"
version = "0.3.2"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion runtime/near-vm-errors/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "near-vm-errors"
version = "0.3.1"
version = "0.3.2"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
license = "Apache-2.0"
Expand Down
20 changes: 5 additions & 15 deletions runtime/near-vm-logic/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "near-vm-logic"
version = "0.3.1"
version = "0.3.2"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -14,10 +14,9 @@ This crate implements the specification of the interface that Near blockchain ex

[dependencies]
bs58 = "0.3"
sodiumoxide = { version = "0.2.5", optional = true }
serde = { version = "1.0", features = ["derive"] }
near-runtime-fees = { path = "../near-runtime-fees", version = "0.3.1" }
near-vm-errors = { path = "../near-vm-errors", version = "0.3.1" }
near-runtime-fees = { path = "../near-runtime-fees", version = "0.3.2" }
near-vm-errors = { path = "../near-vm-errors", version = "0.3.2" }

[dev-dependencies]
serde_json = {version= "1.0", features= ["preserve_order"]}
Expand All @@ -26,39 +25,30 @@ serde_json = {version= "1.0", features= ["preserve_order"]}
[[test]]
name = "test_storage_read_write"
path = "tests/test_storage_read_write.rs"
required-features = ["mocks"]

[[test]]
name = "test_context"
path = "tests/test_context.rs"
required-features = ["mocks"]

[[test]]
name = "test_miscs"
path = "tests/test_miscs.rs"
required-features = ["mocks"]

[[test]]
name = "test_registers"
path = "tests/test_registers.rs"
required-features = ["mocks"]

[[test]]
name = "test_storage_usage"
path = "tests/test_storage_usage.rs"
required-features = ["mocks"]

[[test]]
name = "test_promises"
path = "tests/test_promises.rs"
required-features = ["mocks"]

[[test]]
name = "test_iterators"
path = "tests/test_iterators.rs"
required-features = ["mocks"]

[features]
default = []
# Mocks include some unsafe code to workaround lifetimes and therefore are optional.
mocks = ["sodiumoxide"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
sodiumoxide = "0.2.5"
2 changes: 1 addition & 1 deletion runtime/near-vm-logic/src/lib.rs
Expand Up @@ -3,7 +3,7 @@ mod context;
mod dependencies;
mod gas_counter;
mod logic;
#[cfg(feature = "mocks")]
#[cfg(not(target_arch = "wasm32"))]
pub mod mocks;
pub mod serde_with;

Expand Down
6 changes: 3 additions & 3 deletions runtime/near-vm-runner-standalone/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "near-vm-runner-standalone"
version = "0.3.1"
version = "0.3.2"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -21,5 +21,5 @@ to make sure it has expected behavior once deployed to the blockchain.
[dependencies]
serde_json = "1.0"
clap = "2.33.0"
near-vm-logic = { path = "../near-vm-logic", features = ["mocks"], version = "0.3.1"}
near-vm-runner = { path = "../near-vm-runner", version = "0.3.1" }
near-vm-logic = { path = "../near-vm-logic", version = "0.3.2"}
near-vm-runner = { path = "../near-vm-runner", version = "0.3.2" }
7 changes: 3 additions & 4 deletions runtime/near-vm-runner/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "near-vm-runner"
version = "0.3.1"
version = "0.3.2"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -16,13 +16,12 @@ This crate implements the specification of the interface that Near blockchain ex
cached = "0.9.0"
wasmer-runtime = { version = "0.7.0", features = ["singlepass"] }
wasmer-runtime-core = { version = "0.7.0"}
near-vm-logic = { path="../near-vm-logic", version = "0.3.1"}
near-vm-errors = { path = "../near-vm-errors", version = "0.3.1" }
near-vm-logic = { path="../near-vm-logic", version = "0.3.2"}
near-vm-errors = { path = "../near-vm-errors", version = "0.3.2" }
pwasm-utils = "0.11.0"
parity-wasm = "0.40.1"

[dev-dependencies]
near-vm-logic = { path="../near-vm-logic", features=["mocks"], version = "0.3.0"}
assert_matches = "1.3.0"
wabt = "0.9"
bencher = "0.1.5"
Expand Down
10 changes: 10 additions & 0 deletions runtime/publish.sh
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -ex
for p in near-runtime-fees near-vm-errors near-vm-logic near-vm-runner near-vm-runner-standalone
do
pushd ./${p}
cargo publish
popd
# Sleep a bit to let the previous package upload to crates.io. Otherwise we fail publishing checks.
sleep 10
done

0 comments on commit 61248e3

Please sign in to comment.