Skip to content

tests: always build tests with the serde feature - #446

Open
stringhandler wants to merge 1 commit into
BlockstreamResearch:masterfrom
stringhandler:st-tests-serde
Open

stringhandler wants to merge 1 commit into
BlockstreamResearch:masterfrom
stringhandler:st-tests-serde

Conversation

@stringhandler

Copy link
Copy Markdown
Collaborator

There is a weird non-serde feature set in simc. This makes writing tests that read and write data difficult.

I can't see a place where we would be worried about having serde in the tests, but if there is one, I'm happy to close this pr.

LLM description below:

Tests that read witness or argument files needed a cfg(feature = "serde") gate, so cargo test --no-default-features skipped 52 of them. Make the crate a dev-dependency of itself with serde enabled, so every test build has serde, and drop serde from the 30 test-only cfg attributes.

The library and simc still build without serde; CI checks that with cargo build --no-default-features and cargo hack.

Assisted-by: Claude

Checklist

  • If this PR adds or changes a language feature, it is used in
    examples/kitchen_sink.simf, and test-data/kitchen_sink.json is
    regenerated.

Tests that read witness or argument files needed a cfg(feature = "serde")
gate, so `cargo test --no-default-features` skipped 52 of them. Make the
crate a dev-dependency of itself with serde enabled, so every test build
has serde, and drop serde from the 30 test-only cfg attributes.

The library and simc still build without serde; CI checks that with
`cargo build --no-default-features` and cargo hack.

Assisted-by: Claude
@stringhandler
stringhandler requested a review from delta1 as a code owner October 16, 2026 12:29
@apoelstra

Copy link
Copy Markdown
Contributor

Personally I think we should just make serde non-optional. We use it for pretty basic functionality. To the extent this is a problem for anybody, we should fix it by splitting up the library into multiple crates, some of which maybe could be serde-free.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants