Skip to content
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

extract transaction-error crate #2295

Merged
merged 23 commits into from
Oct 22, 2024

Conversation

kevinheavey
Copy link

@kevinheavey kevinheavey commented Jul 25, 2024

Problem

solana_sdk::signer and solana_sdk::transaction would be great to have outside the SDK. For that to happen, solana_sdk::transaction::error needs to move to its own crate, otherwise we get a circular dependency.

Summary of Changes

  • move error.rs to its own crate
  • update usage of TransctionError in solana-sdk
  • move SanitizeMessageError, AddressLoaderError and TransportError to the transaction-error crate, and re-export for backwards compatibility. These types already depend on TransactionError and need to be pulled out but aren't interesting enough for their own crates. They have a negligible impact on build time

@kevinheavey kevinheavey force-pushed the transaction-error-crate branch 4 times, most recently from 8379e54 to ec6b7ab Compare September 11, 2024 14:43
@kevinheavey kevinheavey force-pushed the transaction-error-crate branch from ec6b7ab to a910bff Compare September 14, 2024 11:01
@kevinheavey kevinheavey force-pushed the transaction-error-crate branch from ff49bf8 to d04af81 Compare September 24, 2024 06:44
@kevinheavey kevinheavey force-pushed the transaction-error-crate branch from 70b4a8a to a1bf5cf Compare October 6, 2024 10:47
@kevinheavey kevinheavey force-pushed the transaction-error-crate branch 4 times, most recently from 6ce6203 to 29c1992 Compare October 12, 2024 10:13
@kevinheavey kevinheavey force-pushed the transaction-error-crate branch 4 times, most recently from 772ca69 to 2d80c77 Compare October 16, 2024 08:46
@kevinheavey kevinheavey requested a review from febo October 16, 2024 10:35
sdk/src/transaction/mod.rs Outdated Show resolved Hide resolved
@febo
Copy link

febo commented Oct 22, 2024

Looks good – @yihau could we please have the crate for this?

@kevinheavey kevinheavey force-pushed the transaction-error-crate branch from 888ea11 to 7645aa8 Compare October 22, 2024 10:17
@febo febo merged commit 31bcb94 into anza-xyz:master Oct 22, 2024
52 checks passed
@kevinheavey kevinheavey deleted the transaction-error-crate branch October 22, 2024 13:03
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
* extract transaction-error crate

* update TransactionError usage in sdk

* fix frozen-abi support

* make serde optional in solana-transaction-error

* update lock file

* fmt

* add #[cfg(not(target_os = "solana"))] where applicable

* fmt

* put solana-transaction-error behind feature "full"

* use workspace lints

* update digest

* make rustc_version optional

* avoid frozen-abi build script

* add back workspace lints

* remove thiserror

* remove unused build deps

* use solana-instruction directly

* move AddressLoaderError and SanitizeMessageError to transaction-error, and fix its solana-instruction dep features

* lint

* move TransportError to transaction-error crate

* use doc_auto_cfg like in anza-xyz#3121

* missing comma

* add deprecations to re-exports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants