Fix json+no_std build of ergotree-ir (missing alloc imports) - #903
Open
mwaddip wants to merge 1 commit into
Open
Fix json+no_std build of ergotree-ir (missing alloc imports)#903mwaddip wants to merge 1 commit into
mwaddip wants to merge 1 commit into
Conversation
…module 072f858 added std-prelude-style code (String::deserialize, .to_string()) to chain/json/sigma_protocol.rs without the alloc imports the crate uses elsewhere under no_std, breaking any build that resolves ergotree-ir with the json feature but without std — e.g. `cargo check -p ergo-nipopow`, which inherits default-features = false from the workspace dependency table. Workspace-wide builds (and CI) mask the breakage via feature unification, since some member always enables ergotree-ir/std. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cargo check -p ergo-nipopow— or any build resolving ergotree-ir with thejsonfeature but withoutstd— fails since 072f858: the SigmaBoolean base16 serializer added tochain/json/sigma_protocol.rsusesString::deserialize/.to_string()from the std prelude, without theallocimports the crate uses elsewhere underno_std.CI and workspace-wide builds never hit it: the workspace dep table pins
default-features = false, but some member always enablesergotree-ir/stdand feature unification applies it to every crate in the graph. A solo-p ergo-nipopowbuild resolves exactly the broken combination.Fix: the two missing
alloc::stringimports — the same pattern the rest of the crate uses (e.g.serialization/serializable.rs).