-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add nostd tests #89
Add nostd tests #89
Conversation
58c987d
to
8291ce1
Compare
* Fix `cargo test --no-default-features` to pass by making std-only tests/docs conditional (added to CI) * Added `Error::Custom(&'static str)` for no-std mode There are a few `FIXME` in the code where things seemed suspicious
201aa62
to
631a360
Compare
src/error.rs
Outdated
#[cfg(feature = "std")] | ||
Custom(String), | ||
/// A custom static Scroll error for reporting messages to clients | ||
CustomStatic(&'static str), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok sorry to go back and forth, but can you remove these changes (adding CustomStatic); i thought it would be required to get the tests to pass, but a change like this (which is a breaking change) would require clients to update on the additional matches. Because this is just for fixing tests I don't think it should be included in this PR.
Additionally, it's unclear to me why we need this, since technically in a no-std environment the user of scroll could return BadInput which also has a static str (they could set size to 0 if they wanted).
Once the static str stuff is walked out we can merge this immediately, sorry for the busy work and appreciate you getting these changes in, but adding a new variant should be discussed separately I think (and isn't required for this, so let's remove it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, np, removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just remove CustomStatic for now, we can consider it in a follow up/additional patch, thanks, otherwise this is good to go
/// Returned when IO based errors are encountered | ||
#[cfg(feature = "std")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just realized this got added; this is technically a breaking change, but nostd could never have worked with this, iiuc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct, io
does not exist without std
, so technically it is not a breaking change :)
* Add nostd tests * Fix `cargo test --no-default-features` to pass by making std-only tests/docs conditional (added to CI) * There are a few `FIXME` in the code where things seemed suspicious
* Add nostd tests * Fix `cargo test --no-default-features` to pass by making std-only tests/docs conditional (added to CI) * There are a few `FIXME` in the code where things seemed suspicious
* Add nostd tests * Fix `cargo test --no-default-features` to pass by making std-only tests/docs conditional (added to CI) * There are a few `FIXME` in the code where things seemed suspicious
This uses MSRV fix #90
cargo test --no-default-features
to pass by making std-only tests/docs conditional (added to CI)Error::Custom(&'static str)
for no-std modeThere are a few
FIXME
in the code where things seemed suspicious