Skip to content

Conversation

@Vlad-Shcherbina
Copy link
Contributor

  • Fix cargo test -p specta-typescript (without --all-features)
  • Reenable some of the tests that were disabled by invalid cfg(feature=...) guards
  • Delete stray tests/json.rs
  • Remove Box wrappers from generics tests

There were some doc examples in this crate that were dependent
on the "serde" feature, which is not enabled by default.
This change wraps problematic pieces into conditional blocks.
@Vlad-Shcherbina
Copy link
Contributor Author

(see commit messages for explanations of the changes)

…...) guards

Package specta-tests doesn't define any features, so anything guarded
by `#[cfg(feature = "zzz")` is excluded.
When the tests were moved from the specta package
in specta-rs#247
these guards were accidentally left in place.

This change removes some of these guards and makes these tests unconditional.

Now such tests are included unconditionally. I think this is better
than adding corresponding features to the test package.
Unlike the library package, we don't care that much about it being
lightweight, and there is value in running the tests always.

It doesn't remove all of the problematic feature guards because
I've lost steam halfway through.
I've marked the remaining guards with TODOs.
This file is not part of the source tree.
There is another file tests/tests/json.rs which is.
It mostly has the same content, but just in case I moved unique parts
from the stray back to the "proper" json.rs.
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.

1 participant