Skip to content

Commit

Permalink
token: Update to v5 for solana-program 2.0 compatibility
Browse files Browse the repository at this point in the history
Updating to allow for version <= 2.0 of the solana crates can appear as
a breaking change for new projects, since cargo pulls in the latest
version of all dependencies, and once there's an attempt to mix v1 and
v2, downstream users will see errors.

This is made worse that the patch versions will quietly pick up the v2
dependency, so if someone doesn't know how to manipulate a cargo
lockfile, they will get build errors and won't know how to resolve them.

All other SPL crates contain a new breaking version (new major for
crates on v1 or more, new minor for crates on v0.X), except for
spl-token.

Bump spl-token to v5.
  • Loading branch information
joncinque committed Jun 24, 2024
1 parent 2a0b2eb commit 93585b4
Show file tree
Hide file tree
Showing 30 changed files with 59 additions and 59 deletions.
60 changes: 30 additions & 30 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 associated-token-account/program-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ solana-program = ">=1.18.11,<=2"
solana-program-test = ">=1.18.11,<=2"
solana-sdk = ">=1.18.11,<=2"
spl-associated-token-account = { version = "3.0.2", path = "../program", features = ["no-entrypoint"] }
spl-token = { version = "4.0", path = "../../token/program", features = ["no-entrypoint"] }
spl-token = { version = "5.0", path = "../../token/program", features = ["no-entrypoint"] }
spl-token-2022 = { version = "3.0.2", path = "../../token/program-2022", features = ["no-entrypoint"] }
2 changes: 1 addition & 1 deletion associated-token-account/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ borsh = "1.5.1"
num-derive = "0.4"
num-traits = "0.2"
solana-program = ">=1.18.11,<=2"
spl-token = { version = "4.0", path = "../../token/program", features = [
spl-token = { version = "5.0", path = "../../token/program", features = [
"no-entrypoint",
] }
spl-token-2022 = { version = "3.0.2", path = "../../token/program-2022", features = [
Expand Down
2 changes: 1 addition & 1 deletion binary-option/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test-sbf = []
[dependencies]
solana-program = ">=1.18.11,<=2"
thiserror = "1.0"
spl-token = { version = "4.0", path = "../../token/program", features = [
spl-token = { version = "5.0", path = "../../token/program", features = [
"no-entrypoint",
] }
arrayref = "0.3.7"
Expand Down
2 changes: 1 addition & 1 deletion binary-oracle-pair/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test-sbf = []
num-derive = "0.4"
num-traits = "0.2"
solana-program = ">=1.18.11,<=2"
spl-token = { version = "4.0", path = "../../token/program", features = [
spl-token = { version = "5.0", path = "../../token/program", features = [
"no-entrypoint",
] }
thiserror = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/transfer-tokens/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test-sbf = []

[dependencies]
solana-program = ">=1.18.11,<=2"
spl-token = { version = "4.0", path = "../../../token/program", features = [ "no-entrypoint" ] }
spl-token = { version = "5.0", path = "../../../token/program", features = [ "no-entrypoint" ] }

[dev-dependencies]
solana-program-test = ">=1.18.11,<=2"
Expand Down
2 changes: 1 addition & 1 deletion feature-proposal/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test-sbf = []
[dependencies]
borsh = "1.5.1"
solana-program = ">=1.18.11,<=2"
spl-token = { version = "4.0", path = "../../token/program", features = [
spl-token = { version = "5.0", path = "../../token/program", features = [
"no-entrypoint",
] }

Expand Down
2 changes: 1 addition & 1 deletion governance/addin-mock/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ num-traits = "0.2"
serde = "1.0.203"
serde_derive = "1.0.103"
solana-program = ">=1.18.11,<=2"
spl-token = { version = "4.0", path = "../../../token/program", features = [
spl-token = { version = "5.0", path = "../../../token/program", features = [
"no-entrypoint",
] }
spl-governance-addin-api = { version = "0.1.4", path = "../../addin-api" }
Expand Down
2 changes: 1 addition & 1 deletion governance/chat/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ num-traits = "0.2"
serde = "1.0.203"
serde_derive = "1.0.103"
solana-program = ">=1.18.11,<=2"
spl-token = { version = "4.0", path = "../../../token/program", features = [
spl-token = { version = "5.0", path = "../../../token/program", features = [
"no-entrypoint",
] }
spl-governance = { version = "4.0.0", path = "../../program", features = [
Expand Down
2 changes: 1 addition & 1 deletion governance/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ num-traits = "0.2"
serde = "1.0.203"
serde_derive = "1.0.103"
solana-program = ">=1.18.11,<=2"
spl-token = { version = "4.0", path = "../../token/program", features = [
spl-token = { version = "5.0", path = "../../token/program", features = [
"no-entrypoint",
] }
spl-governance-tools = { version = "0.1.4", path = "../tools" }
Expand Down
2 changes: 1 addition & 1 deletion governance/test-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde_derive = "1.0.103"
solana-program = ">=1.18.11,<=2"
solana-program-test = ">=1.18.11,<=2"
solana-sdk = ">=1.18.11,<=2"
spl-token = { version = "4.0", path = "../../token/program", features = [
spl-token = { version = "5.0", path = "../../token/program", features = [
"no-entrypoint",
] }
thiserror = "1.0"
2 changes: 1 addition & 1 deletion governance/tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ num-traits = "0.2"
serde = "1.0.203"
serde_derive = "1.0.103"
solana-program = ">=1.18.11,<=2"
spl-token = { version = "4.0", path = "../../token/program", features = [
spl-token = { version = "5.0", path = "../../token/program", features = [
"no-entrypoint",
] }
thiserror = "1.0"
2 changes: 1 addition & 1 deletion managed-token/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ solana-program = ">=1.18.11,<=2"
spl-associated-token-account = { version = "3.0.2", path = "../../associated-token-account/program", features = [
"no-entrypoint",
] }
spl-token = { version = "4.0", path = "../../token/program", features = [
spl-token = { version = "5.0", path = "../../token/program", features = [
"no-entrypoint",
] }
thiserror = "^1.0.61"
Expand Down
2 changes: 1 addition & 1 deletion single-pool/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ solana-remote-wallet = ">=1.18.11,<=2"
solana-sdk = ">=1.18.11,<=2"
solana-transaction-status = ">=1.18.11,<=2"
solana-vote-program = ">=1.18.11,<=2"
spl-token = { version = "4.0", path = "../../token/program", features = [
spl-token = { version = "5.0", path = "../../token/program", features = [
"no-entrypoint",
] }
spl-token-client = { version = "0.10.0", path = "../../token/client" }
Expand Down
2 changes: 1 addition & 1 deletion single-pool/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ num-traits = "0.2"
num_enum = "0.7.2"
solana-program = ">=1.18.11,<=2"
solana-security-txt = "1.1.1"
spl-token = { version = "4.0", path = "../../token/program", features = [
spl-token = { version = "5.0", path = "../../token/program", features = [
"no-entrypoint",
] }
spl-associated-token-account = { version = "3.0.2", path = "../../associated-token-account/program", features = [
Expand Down
Loading

0 comments on commit 93585b4

Please sign in to comment.