Skip to content

Commit

Permalink
Merge pull request #109 from metaplex-foundation/febo/binary-args
Browse files Browse the repository at this point in the history
Add binaryArgs field
  • Loading branch information
febo authored Nov 22, 2023
2 parents b28d749 + d47b232 commit ff82fd4
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion src/cli/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export function handleAnchor(
prettierConfig?: PrettierOptions
) {
const { idlDir, binaryInstallDir, programDir } = config
const spawnArgs = ['build', '--idl', idlDir]
const binaryArgs = config.binaryArgs?.split(' ') ?? []
const spawnArgs = ['build', '--idl', idlDir, ...binaryArgs]
const spawnOpts: SpawnOptionsWithoutStdio = {
cwd: programDir,
}
Expand Down
1 change: 1 addition & 0 deletions src/cli/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type SolitaConfigBase = {
typeAliases?: TypeAliases
serializers?: Serializers
removeExistingIdl?: boolean
binaryArgs?: string
}

export type SolitaConfigAnchor = SolitaConfigBase & {
Expand Down
1 change: 1 addition & 0 deletions test/anchor-examples/basic-0/.solitarc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ module.exports = {
sdkDir,
binaryInstallDir,
programDir,
binaryArgs: "-- --features testing"
}
4 changes: 2 additions & 2 deletions test/anchor-examples/basic-0/idl/basic_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"metadata": {
"address": "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS",
"origin": "anchor",
"binaryVersion": "0.24.2",
"libVersion": "0.24.2"
"binaryVersion": "0.27.0",
"libVersion": "0.27.0"
}
}
3 changes: 2 additions & 1 deletion test/anchor-examples/basic-0/programs/basic-0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ name = "basic_0"
[features]
no-entrypoint = []
cpi = ["no-entrypoint"]
testing = []

[dependencies]
anchor-lang = "0.24.2"
anchor-lang = "0.27.0"
4 changes: 2 additions & 2 deletions test/anchor-examples/basic-1/idl/basic_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"metadata": {
"address": "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS",
"origin": "anchor",
"binaryVersion": "0.24.2",
"libVersion": "0.24.2"
"binaryVersion": "0.27.0",
"libVersion": "0.27.0"
}
}
2 changes: 1 addition & 1 deletion test/anchor-examples/basic-1/programs/basic-1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ no-entrypoint = []
cpi = ["no-entrypoint"]

[dependencies]
anchor-lang = "0.24.2"
anchor-lang = "0.27.0"
4 changes: 2 additions & 2 deletions test/anchor-examples/basic-2/idl/basic_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"metadata": {
"address": "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS",
"origin": "anchor",
"binaryVersion": "0.24.2",
"libVersion": "0.24.2"
"binaryVersion": "0.27.0",
"libVersion": "0.27.0"
}
}
2 changes: 1 addition & 1 deletion test/anchor-examples/basic-2/programs/basic-2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ no-entrypoint = []
cpi = ["no-entrypoint"]

[dependencies]
anchor-lang = "0.24.2"
anchor-lang = "0.27.0"
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ no-entrypoint = []
cpi = ["no-entrypoint"]

[dependencies]
anchor-lang = "0.24.2"
anchor-lang = "0.27.0"
puppet = { path = "../puppet", features = ["cpi"] }
2 changes: 1 addition & 1 deletion test/anchor-examples/basic-3/programs/puppet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ no-entrypoint = []
cpi = ["no-entrypoint"]

[dependencies]
anchor-lang = "0.24.2"
anchor-lang = "0.27.0"
4 changes: 2 additions & 2 deletions test/anchor-examples/basic-4/idl/basic_4.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"metadata": {
"address": "CwrqeMj2U8tFr1Rhkgwc84tpAsqbt9pTt2a4taoTADPr",
"origin": "anchor",
"binaryVersion": "0.24.2",
"libVersion": "0.24.2"
"binaryVersion": "0.27.0",
"libVersion": "0.27.0"
}
}
2 changes: 1 addition & 1 deletion test/anchor-examples/basic-4/programs/basic-4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ no-entrypoint = []
cpi = ["no-entrypoint"]

[dependencies]
anchor-lang = "0.24.2"
anchor-lang = "0.27.0"

0 comments on commit ff82fd4

Please sign in to comment.