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

ci: Respect {{ matrix.toolchain }} in "Test Core: test" job #1085

Merged
merged 7 commits into from
Sep 20, 2023

Conversation

dj8yfo
Copy link
Collaborator

@dj8yfo dj8yfo commented Sep 20, 2023

No description provided.

.github/workflows/test.yml Outdated Show resolved Hide resolved
@dj8yfo dj8yfo changed the title ci: add +${{ matrix.toolchain }} arg to Test Core: test job ci: add +${{ matrix.toolchain }} arg to Test Core: test job Sep 20, 2023
Comment on lines +29 to +31
cargo update -p anstyle --precise 1.0.2
cargo update -p clap --precise 4.3.24
cargo update -p clap_lex --precise 0.5.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i've tried

cargo +nightly update -Z direct-minimal-versions

from this recipe to automate this process of adding exceptions,
but, besides the fact, that this command required applying following diff to hint minimal versions to be able to run successfully

diff --git a/near-contract-standards/Cargo.toml b/near-contract-standards/Cargo.toml
index 263deee..8942314 100644
--- a/near-contract-standards/Cargo.toml
+++ b/near-contract-standards/Cargo.toml
@@ -7,17 +7,17 @@ license = "MIT OR Apache-2.0"
 categories = ["wasm"]
 repository = "https://github.com/near/near-sdk-rs"
 homepage = "https://near-sdk.io"
 documentation = "https://docs.rs/near-contract-standards"
 description = """
 NEAR smart contracts standard library.
 """
 
 [dependencies]
 near-sdk = { path = "../near-sdk", version = "~4.1.1", default-features = false, features = ["legacy"] }
-serde = "1"
-serde_json = "1"
-schemars = "0.8"
+serde = "1.0.157"
+serde_json = "1.0.68"
+schemars = "0.8.11"
 
 [features]
 default = ["abi"]
 abi = ["near-sdk/abi"]
diff --git a/near-sdk-macros/Cargo.toml b/near-sdk-macros/Cargo.toml
index 9b7e7bc..a110e1f 100644
--- a/near-sdk-macros/Cargo.toml
+++ b/near-sdk-macros/Cargo.toml
@@ -8,21 +8,21 @@ categories = ["wasm"]
 repository = "https://github.com/near/near-sdk-rs"
 homepage = "https://near-sdk.io"
 description = """
 Main macro of the library for writing NEAR smart contracts.
 """
 
 [lib]
 proc-macro = true
 
 [dependencies]
-proc-macro2 = "1.0"
-syn = { version = "1", features = ["full", "fold", "extra-traits", "visit"] }
+proc-macro2 = "1.0.55"
+syn = { version = "1.0.60", features = ["full", "fold", "extra-traits", "visit"] }
 strum = "0.24"
 strum_macros = "0.24"
-quote = "1.0"
+quote = "1.0.25"
 Inflector = { version = "0.11.4", default-features = false, features = [] }
 
 [features]
 abi = []
 __abi-embed = ["abi"]
 __abi-generate = ["abi"]
diff --git a/near-sdk/Cargo.toml b/near-sdk/Cargo.toml
index a015a64..9905772 100644
--- a/near-sdk/Cargo.toml
+++ b/near-sdk/Cargo.toml
@@ -12,44 +12,44 @@ description = """
 Rust library for writing NEAR smart contracts.
 """
 
 [[test]]
 name = "compilation_tests"
 path = "compilation_tests/all.rs"
 required-features = ["abi", "unstable"]
 
 [dependencies]
 # Provide near_bidgen macros.
-serde = { version = "1", features = ["derive"] }
-serde_json = "1"
+serde = { version = "1.0.157", features = ["derive"] }
+serde_json = "1.0.68"
 near-sdk-macros = { path = "../near-sdk-macros", version = "~4.1.1" }
 near-sys = { path = "../near-sys", version = "0.2" }
 base64 = "0.13"
-borsh = { version = "0.9", features = ["const-generics"] }
+borsh = { version = "0.9.3", features = ["const-generics"] }
 bs58 = "0.4"
-schemars = { version = "0.8.8", optional = true }
+schemars = { version = "0.8.11", optional = true }
 # Export dependencies for contracts
 wee_alloc = { version = "0.4.5", default-features = false, optional = true }
 
 # Used for caching, might be worth porting only functionality needed.
 once_cell = { version = "1.17", default-features = false }
 
 near-abi = { version = "0.3.0", features = ["__chunked-entries"], optional = true }
 
 [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
 near-vm-logic = { version = "0.17", optional = true }
 near-primitives-core = { version = "0.17", optional = true }
 near-primitives = { version = "0.17", optional = true }
 near-crypto = { version = "0.17", optional = true }
 
 [dev-dependencies]
-rand = "0.8.4"
+rand = "0.8.5"
 trybuild = "1.0"
 rustversion = "1.0"
 rand_xorshift = "0.3"
 quickcheck = "1.0"
 arbitrary = { version = "1.2.3", features = ["derive"] }
 derive_arbitrary = "1.2.3"
 hex = { version = "0.4.3", features = ["serde"] }
 
 [features]
 default = ["wee_alloc", "unit-testing", "legacy", "abi"]

it generates a Cargo.lock file, where the versions of problematic anstyle, clap and clap_lex are greater than needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i've tried cargo +nightly update -Z minimal-versions as well.
it doesn't require hinting, but cannot figure out the right version for clap as well

@dj8yfo dj8yfo marked this pull request as ready for review September 20, 2023 18:19
…e ever will update `toolchain` we may not notice that it was not actually selected
@frol frol enabled auto-merge (squash) September 20, 2023 18:31
@frol frol changed the title ci: add +${{ matrix.toolchain }} arg to Test Core: test job ci: Respect {{ matrix.toolchain }} in "Test Core: test" job Sep 20, 2023
auto-merge was automatically disabled September 20, 2023 19:37

Head branch was pushed to by a user without write access

@frol frol enabled auto-merge (squash) September 20, 2023 19:44
@frol frol merged commit f033430 into near:master Sep 20, 2023
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants