Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kevinheavey
Copy link
Contributor

The instruction-error and program-error crates have std features in Cargo.toml that don't do anything

@kevinheavey kevinheavey requested a review from a team as a code owner July 30, 2025 15:29
Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks!

@joncinque joncinque enabled auto-merge (squash) July 30, 2025 23:29
@joncinque joncinque changed the title remove unused std features {instruction,program}error!: remove unused std features Jul 31, 2025
use solana_frozen_abi_macro::{AbiEnumVisitor, AbiExample};
#[cfg(feature = "std")]
#[cfg(feature = "frozen-abi")]
extern crate std;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this be confusing since std is included even without a std feature?

i guess my expectation for a no-std crate is that it doesn't use std unless you pass std feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

frozen-abi doesn't count imo, if someone pulls that in they have other problems

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd agree with that -- the frozen-abi feature is only used for a specific test build, and the macros happen to require std, so we have to pull in std somehow.

@joncinque joncinque added the breaking PR contains breaking changes label Aug 1, 2025
@joncinque joncinque merged commit 65aad7d into anza-xyz:master Aug 4, 2025
26 checks passed
febo pushed a commit to febo/solana-sdk that referenced this pull request Sep 21, 2025
* remove unused std features

* fmt

* add extern crate std under frozen-abi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking PR contains breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants