Skip to content

Commit

Permalink
Extract program-error crate (#2413)
Browse files Browse the repository at this point in the history
* extract program-error crate

* remove `default-features = false` that doesn't do anything

* make serde optional in program-error crate

* update lock file

* remove thiserror from program-error crate

* update lock file

* move ProgramResult definition to program-error crate

* unused import

* fix features

* missing whitespace

Co-authored-by: Jon C <me@jonc.dev>

---------

Co-authored-by: Jon C <me@jonc.dev>
  • Loading branch information
kevinheavey and joncinque committed Sep 16, 2024
1 parent 8aae271 commit 2a962c9
Show file tree
Hide file tree
Showing 8 changed files with 394 additions and 279 deletions.
15 changes: 15 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ members = [
"sdk/msg",
"sdk/package-metadata-macro",
"sdk/program",
"sdk/program-error",
"sdk/program-memory",
"sdk/program-option",
"sdk/pubkey",
Expand Down Expand Up @@ -423,6 +424,7 @@ solana-perf = { path = "perf", version = "=2.1.0" }
solana-poh = { path = "poh", version = "=2.1.0" }
solana-poseidon = { path = "poseidon", version = "=2.1.0" }
solana-program = { path = "sdk/program", version = "=2.1.0", default-features = false }
solana-program-error = { path = "sdk/program-error", version = "=2.1.0" }
solana-program-memory = { path = "sdk/program-memory", version = "=2.1.0" }
solana-program-option = { path = "sdk/program-option", version = "=2.1.0" }
solana-program-runtime = { path = "program-runtime", version = "=2.1.0" }
Expand Down
15 changes: 15 additions & 0 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions sdk/program-error/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[package]
name = "solana-program-error"
description = "Solana ProgramError type and related definitions."
documentation = "https://docs.rs/solana-program-error"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[dependencies]
borsh = { workspace = true, optional = true }
num-traits = { workspace = true }
serde = { workspace = true, optional = true }
serde_derive = { workspace = true, optional = true }
solana-decode-error = { workspace = true }
solana-instruction = { workspace = true, default-features = false, features = [
"std",
] }
solana-msg = { workspace = true }
solana-pubkey = { workspace = true, default-features = false }

[features]
borsh = ["dep:borsh"]
serde = ["dep:serde", "dep:serde_derive"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Loading

0 comments on commit 2a962c9

Please sign in to comment.