-
Notifications
You must be signed in to change notification settings - Fork 125
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
Publish to crates.io #528
Comments
I think it's a good idea. Unfortunately someone already took the name. We could try to contact them though. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Published crates (see branch https://github.com/scs/substrate-api-client/tree/bh/crates-io):
Tested build via CI: https://github.com/scs/substrate-api-client/actions/runs/4730423144 run through except for tests. The reason it didn't build in test mode is because of a Substrate dependencies mismatch (once via github, once via crates.io in the api-client). But I think this suffices because it built successfully and clippy was happy as well :) |
Necessary changes: Change all GitHub and local dependencies in the More concrete:
# Substrate no_std dependencies
-sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" }
-sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
-sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
+sp-core = { version = "19.0", default-features = false, features = ["full_crypto"] }
+sp-runtime = { version = "22.0", default-features = false }
+sp-runtime-interface = { version = "16.0", default-features = false }
# substrate std / wasm only
-frame-support = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" }
+frame-support = { version = "20.0", optional = true }
# local deps
-ac-compose-macros = { path = "compose-macros", default-features = false }
-ac-node-api = { path = "node-api", default-features = false }
-ac-primitives = { path = "primitives", default-features = false }
+ac-compose-macros = { version = "0.3", default-features = false }
+ac-node-api = { version = "0.3", default-features = false }
+ac-primitives = { version = "0.6", default-features = false }
[dev-dependencies]
-ac-node-api = { path = "node-api", features = ["mocks"] }
-kitchensink-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
+ac-node-api = { version = "0.3", features = ["mocks"] }
+kitchensink-runtime = { package = "node-template-runtime", version = "2.0" }
scale-info = { version = "2.1.1", features = ["derive"] }
# local
-ac-primitives = { path = "../primitives", default-features = false }
+ac-primitives = { version = "0.6", default-features = false }
# substrate
-sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" }
-sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
+sp-core = { version = "19.0", default-features = false, features = ["full_crypto"] }
+sp-runtime = { version = "22.0", default-features = false }
# need to add this for `no_std`
-sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate.git", features = ["full_crypto"], branch = "master" }
-sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
-
+sp-application-crypto = { version = "21.0", default-features = false, features = ["full_crypto"] }
+sp-runtime-interface = { version = "16.0", default-features = false }
# local
-ac-primitives = { path = "../primitives", default-features = false }
+ac-primitives = { version = "0.6", default-features = false }
# substrate no_std
-sp-core = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" }
-sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
-sp-runtime-interface = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
-sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
-sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
-sp-weights = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "master" }
+sp-core = { version = "19.0", default-features = false, features = ["full_crypto"] }
+sp-runtime = { version = "22.0", default-features = false }
+sp-runtime-interface = { version = "16.0", default-features = false }
+sp-staking = { version = "18.0", default-features = false }
+sp-version = { version = "20.0", default-features = false }
+sp-weights = { version = "18.0", default-features = false }
# need to add this for the app_crypto macro
-sp-application-crypto = { default-features = false, features = ["full_crypto"], git = "https://github.com/paritytech/substrate.git", branch = "master" }
+sp-application-crypto = { version = "21.0", default-features = false, features = ["full_crypto"] }
# substrate std / wasm only
-frame-system = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" }
-pallet-assets = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" }
-pallet-balances = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" }
-pallet-contracts = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" }
-pallet-staking = { optional = true, git = "https://github.com/paritytech/substrate.git", branch = "master" }
+frame-system = { version = "20.0", optional = true }
+pallet-assets = { version = "21.0", optional = true }
+pallet-balances = { version = "20.0", optional = true }
+pallet-contracts = { version = "19.0", optional = true }
+pallet-staking = { version = "20.0", optional = true }
[dev-dependencies]
-node-template-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
-sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
+node-template-runtime = { version = "2.0" }
+sp-keyring = { version = "22.0" } |
Would be great if you could publish major bumps on crates.io for every minor polkadot-sdk upgrade. As polkadot-sdk isn't semver compliant, releases are always breaking changes, so they bump crates.io major revisions for every minor release of the sdk. Probably easiest to just follow the same rule. encointer pallets now get versioned like this and published to crates.io:
against semver-logic, encointer-internal changes will be versioned with minor or patch revisions |
As crates.io seems to be needed now, I'd propose to change our release cycle to match the one of parity. E.g. as @brenzi suggested, for every polkadot-sdk release, we will release a version of our own - and publish it on crates.io accordingly. If agreed upon, the following needs to be done:
|
@brenzi v0.17 has been published, but for v1.8.0. Is that alright with you? |
@haerdib amazing, thank you! |
@haerdib I can't find substrate-client-keystore crate on crates.io. May I ask you to publish that as well? |
Why not? It would certainly increase the visibility of this crate and we're already using tags and semantic versioning.
The text was updated successfully, but these errors were encountered: