manage dependencies in workspace (#588)

* move important dependencies to workspace
* enable workspace inheritance
This commit is contained in:
Maximilian Schneider 2023-05-17 20:48:14 +02:00 committed by GitHub
parent 5fc7aa1092
commit 0b22e41acd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 91 additions and 61 deletions

View File

@ -5,6 +5,22 @@ members = [
"lib/*",
]
[workspace.dependencies]
anchor-client = "0.27.0"
anchor-lang = "0.27.0"
anchor-spl = "0.27.0"
fixed = { path = "./3rdparty/fixed", version = "1.11.0" }
pyth-sdk-solana = "0.1.0"
serum_dex = { git = "https://github.com/openbook-dex/program.git" }
solana-address-lookup-table-program = "~1.14.9"
solana-account-decoder = "~1.14.9"
solana-client = "~1.14.9"
solana-logger = "~1.14.9"
solana-program = "~1.14.9"
solana-program-test = "~1.14.9"
solana-rpc = "~1.14.9"
solana-sdk = "~1.14.9"
[profile.release]
overflow-checks = true

View File

@ -1,3 +1,5 @@
cargo-features = ["workspace-inheritance"]
[package]
name = "mango-v4-cli"
version = "0.3.0"
@ -8,20 +10,20 @@ name = "cli"
path = "src/main.rs"
[dependencies]
anchor-client = "0.27.0"
anchor-lang = "0.27.0"
anchor-spl = "0.27.0"
anchor-client = { workspace = true }
anchor-lang = { workspace = true }
anchor-spl = { workspace = true }
anyhow = "1.0"
clap = { version = "3.1.8", features = ["derive", "env"] }
dotenv = "0.15.0"
env_logger = "0.8.4"
fixed = { path = "../../3rdparty/fixed", version = "1.11.0", features = ["serde", "borsh"] }
fixed = { workspace = true, features = ["serde", "borsh"] }
futures = "0.3.21"
log = "0.4.0"
mango-v4 = { path = "../../programs/mango-v4", features = ["client"] }
mango-v4-client = { path = "../../lib/client" }
pyth-sdk-solana = "0.1.0"
serum_dex = { git = "https://github.com/openbook-dex/program.git", default-features=false,features = ["no-entrypoint", "program"] }
solana-client = "~1.14.9"
solana-sdk = "~1.14.9"
pyth-sdk-solana = { workspace = true }
serum_dex = { workspace = true, default-features=false,features = ["no-entrypoint", "program"] }
solana-client = { workspace = true }
solana-sdk = { workspace = true }
tokio = { version = "1.14.1", features = ["rt-multi-thread", "time", "macros", "sync"] }

View File

@ -1,3 +1,5 @@
cargo-features = ["workspace-inheritance"]
[package]
name = "mango-v4-keeper"
version = "0.3.0"
@ -8,23 +10,23 @@ name = "keeper"
path = "src/main.rs"
[dependencies]
anchor-client = "0.27.0"
anchor-lang = "0.27.0"
anchor-spl = "0.27.0"
anchor-client = { workspace = true }
anchor-lang = { workspace = true }
anchor-spl = { workspace = true }
anyhow = "1.0"
clap = { version = "3.1.8", features = ["derive", "env"] }
dotenv = "0.15.0"
env_logger = "0.8.4"
fixed = { path = "../../3rdparty/fixed", version = "1.11.0", features = ["serde", "borsh"] }
fixed = { workspace = true, features = ["serde", "borsh"] }
futures = "0.3.21"
itertools = "0.10.3"
log = "0.4.0"
mango-v4 = { path = "../../programs/mango-v4", features = ["client"] }
mango-v4-client = { path = "../../lib/client" }
pyth-sdk-solana = "0.1.0"
serum_dex = { git = "https://github.com/openbook-dex/program.git", default-features=false,features = ["no-entrypoint", "program"] }
solana-client = "~1.14.9"
solana-sdk = "~1.14.9"
pyth-sdk-solana = { workspace = true }
serum_dex = { workspace = true, default-features=false,features = ["no-entrypoint", "program"] }
solana-client = { workspace = true }
solana-sdk = { workspace = true }
tokio = { version = "1.14.1", features = ["rt-multi-thread", "time", "macros", "sync"] }
prometheus = "0.13.3"
warp = "0.3.3"

View File

@ -1,3 +1,5 @@
cargo-features = ["workspace-inheritance"]
[package]
name = "mango-v4-liquidator"
version = "0.0.1"
@ -8,8 +10,8 @@ name = "liquidator"
path = "src/main.rs"
[dependencies]
anchor-lang = "0.27.0"
anchor-client = "0.27.0"
anchor-lang = { workspace = true }
anchor-client = { workspace = true }
anyhow = "1.0"
arrayref = "0.3.6"
async-channel = "1.6"
@ -20,7 +22,7 @@ bytemuck = "^1.7.2"
bytes = "1.0"
clap = { version = "3.1.8", features = ["derive", "env"] }
dotenv = "0.15.0"
fixed = { path = "../../3rdparty/fixed", version = "1.11.0", features = ["serde"] }
fixed = { workspace = true, features = ["serde"] }
futures = "0.3.17"
futures-core = "0.3"
futures-util = "0.3"
@ -32,18 +34,18 @@ log = "0.4"
mango-v4 = { path = "../../programs/mango-v4", features = ["client"] }
mango-v4-client = { path = "../../lib/client" }
once_cell = "1.12.0"
pyth-sdk-solana = "0.1.0"
pyth-sdk-solana = { workspace = true }
rand = "0.7"
serde = "1.0.130"
serde_derive = "1.0.130"
serde_json = "1.0.68"
serum_dex = { git = "https://github.com/openbook-dex/program.git", default-features=false,features = ["no-entrypoint", "program"] }
serum_dex = { workspace = true, default-features=false,features = ["no-entrypoint", "program"] }
shellexpand = "2.1.0"
solana-account-decoder = "~1.14.9"
solana-client = "~1.14.9"
solana-logger = "~1.14.9"
solana-rpc = "~1.14.9"
solana-sdk = "~1.14.9"
solana-account-decoder = { workspace = true }
solana-client = { workspace = true }
solana-logger = { workspace = true }
solana-rpc = { workspace = true }
solana-sdk = { workspace = true }
tokio = { version = "1", features = ["full"] }
tokio-stream = { version = "0.1.9"}
tokio-tungstenite = "0.16.1"

View File

@ -1,3 +1,5 @@
cargo-features = ["workspace-inheritance"]
[package]
name = "mango-v4-settler"
version = "0.0.1"
@ -8,8 +10,8 @@ name = "settler"
path = "src/main.rs"
[dependencies]
anchor-lang = "0.27.0"
anchor-client = "0.27.0"
anchor-lang = { workspace = true }
anchor-client = { workspace = true }
anyhow = "1.0"
arrayref = "0.3.6"
async-channel = "1.6"
@ -21,7 +23,7 @@ bytemuck = "^1.7.2"
bytes = "1.0"
clap = { version = "3.1.8", features = ["derive", "env"] }
dotenv = "0.15.0"
fixed = { path = "../../3rdparty/fixed", version = "1.11.0", features = ["serde"] }
fixed = { workspace = true, features = ["serde"] }
futures = "0.3.17"
futures-core = "0.3"
futures-util = "0.3"
@ -34,18 +36,18 @@ mango-v4 = { path = "../../programs/mango-v4", features = ["client"] }
mango-v4-client = { path = "../../lib/client" }
once_cell = "1.12.0"
priority-queue = "1.3.1"
pyth-sdk-solana = "0.1.0"
pyth-sdk-solana = { workspace = true }
rand = "0.7"
serde = "1.0.130"
serde_derive = "1.0.130"
serde_json = "1.0.68"
serum_dex = { git = "https://github.com/openbook-dex/program.git", default-features=false,features = ["no-entrypoint", "program"] }
serum_dex = { workspace = true, default-features=false,features = ["no-entrypoint", "program"] }
shellexpand = "2.1.0"
solana-account-decoder = "~1.14.9"
solana-client = "~1.14.9"
solana-logger = "~1.14.9"
solana-rpc = "~1.14.9"
solana-sdk = "~1.14.9"
solana-account-decoder = { workspace = true }
solana-client = { workspace = true }
solana-logger = { workspace = true }
solana-rpc = { workspace = true }
solana-sdk = { workspace = true }
tokio = { version = "1", features = ["full"] }
tokio-stream = { version = "0.1.9"}
tokio-tungstenite = "0.16.1"

View File

@ -1,3 +1,5 @@
cargo-features = ["workspace-inheritance"]
[package]
name = "mango-v4-client"
version = "0.3.0"
@ -7,27 +9,27 @@ edition = "2021"
doctest = false
[dependencies]
anchor-client = "0.27.0"
anchor-lang = "0.27.0"
anchor-spl = "0.27.0"
anchor-client = { workspace = true }
anchor-lang = { workspace = true }
anchor-spl = { workspace = true }
anyhow = "1.0"
async-channel = "1.6"
async-once-cell = { version = "0.4.2", features = ["unpin"] }
async-trait = "0.1.52"
fixed = { path = "../../3rdparty/fixed", version = "1.11.0", features = ["serde", "borsh"] }
fixed = { workspace = true, features = ["serde", "borsh"] }
futures = "0.3.25"
itertools = "0.10.3"
jsonrpc-core = "18.0.0"
jsonrpc-core-client = { version = "18.0.0", features = ["ws", "http", "tls"] }
mango-v4 = { path = "../../programs/mango-v4", features = ["client"] }
pyth-sdk-solana = "0.1.0"
serum_dex = { git = "https://github.com/openbook-dex/program.git", default-features=false,features = ["no-entrypoint", "program"] }
pyth-sdk-solana = { workspace = true }
serum_dex = { workspace = true, default-features=false,features = ["no-entrypoint", "program"] }
shellexpand = "2.1.0"
solana-account-decoder = "~1.14.9"
solana-client = "~1.14.9"
solana-rpc = "~1.14.9"
solana-sdk = "~1.14.9"
solana-address-lookup-table-program = "~1.14.9"
solana-account-decoder = { workspace = true }
solana-client = { workspace = true }
solana-rpc = { workspace = true }
solana-sdk = { workspace = true }
solana-address-lookup-table-program = { workspace = true }
mango-feeds-connector = "0.1.1"
spl-associated-token-account = "1.0.3"
thiserror = "1.0.31"

View File

@ -1,3 +1,5 @@
cargo-features = ["workspace-inheritance"]
[package]
name = "mango-v4"
version = "0.16.0"
@ -23,31 +25,31 @@ enable-gpl = []
[dependencies]
# todo: when to fix, when to use caret? need a regular chore to bump dependencies
# note: possibly need init-if-needed feature
anchor-lang = "0.27.0"
anchor-spl = "0.27.0"
anchor-lang = { workspace = true }
anchor-spl = { workspace = true }
arrayref = "0.3.6"
bincode = "1.3.3"
borsh = { version = "0.9.3", features = ["const-generics"] }
bytemuck = { version = "^1.7.2", features = ["min_const_generics"] }
default-env = "0.1.1"
derivative = "2.2.0"
fixed = { path = "../../3rdparty/fixed", version = "1.11.0", features = ["serde", "borsh", "debug-assert-in-release"] }
fixed = { workspace = true, features = ["serde", "borsh", "debug-assert-in-release"] }
num_enum = "0.5.1"
pyth-sdk-solana = "0.1.0"
pyth-sdk-solana = { workspace = true }
serde = "^1.0"
serum_dex = { git = "https://github.com/openbook-dex/program.git", default-features=false, features = ["no-entrypoint", "program"] }
solana-address-lookup-table-program = "~1.14.9"
solana-program = "~1.14.9"
solana-sdk = { version = "~1.14.9", default-features = false, optional = true }
serum_dex = { workspace = true, default-features=false, features = ["no-entrypoint", "program"] }
solana-address-lookup-table-program = { workspace = true }
solana-program = { workspace = true }
solana-sdk = { workspace = true, default-features = false, optional = true }
solana-security-txt = "1.1.0"
static_assertions = "1.1"
switchboard-program = ">=0.2.0"
switchboard-v2 = "0.1.17"
[dev-dependencies]
solana-sdk = { version = "~1.14.9", default-features = false }
solana-program-test = "~1.14.9"
solana-logger = "~1.14.9"
solana-sdk = { workspace = true, default-features = false }
solana-program-test = { workspace = true }
solana-logger = { workspace = true }
spl-token = { version = "^3.0.0", features = ["no-entrypoint"] }
spl-associated-token-account = { version = "^1.0.3", features = ["no-entrypoint"] }
bincode = "^1.3.1"

View File

@ -1,3 +1,5 @@
cargo-features = ["workspace-inheritance"]
[package]
name = "margin-trade"
version = "0.1.0"
@ -18,6 +20,6 @@ default = []
test-bpf = []
[dependencies]
anchor-lang = "0.27.0"
anchor-spl = "0.27.0"
solana-program = "~1.14.9"
anchor-lang = { workspace = true }
anchor-spl = { workspace = true }
solana-program = { workspace = true }