-
Notifications
You must be signed in to change notification settings - Fork 57
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
#[no_std] support #148
#[no_std] support #148
Conversation
Haven't looked at the failure yet, but the CI testing should be done differently https://users.rust-lang.org/t/how-to-make-a-test-guarantee-that-a-crate-was-built-with-no-std/24964 |
I expanded the initial comment. |
Nice! I'll give this a test spin and look around to see if i can help fix some stuff as i find them :) |
I just remembered that I forgot about this. IIRC the most recently merged PR was incompatible with this, so it will need a quick rebase. We can start working towards a v0.3.0. |
Note that the signature change for combine_all and combine_all_option can break type inference in existing code.
Because it will require std.
Oh, for crying out loud: I am once again stumped how to make this work. The last I think more specifically the issue is that we use |
I'd like to merge this soon because basically every single intervening PR has broken it. This means the next version will have to be a major version bump. |
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.
Overall LGTM, the Cargo feature-flagging looks reasonable to me (though I must admit I'm not super experienced there), and the Rust changes look fine to me as well.
//! assert_eq!(d_user.first_name, "Joe"); | ||
//! # } | ||
//! ``` | ||
#![cfg_attr(feature = "std", doc = r#" |
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.
Interesting !
@lloydmeta @ExpHP Btw I should note that my language & release team duties currently prevent me from devoting any time to this crate atm. So please don't feel the need to ask for my opinions. :) (I might have time in the future...) |
Closes #147
The breaking changes are:
monoid::combine_all
,semigroup::combine_all_option
) may break type inferencestd
andvalidated
may break client crates usingdefault-features = false
.The toughest part is the tests. Several doctests were cfged out using the fact that doc comments are actually attributes.
It is crucial that
frunk_derive
does not depend on thestd
feature offrunk_core
, or else we'd have to remove all usage of#[derive]
from the doc tests infrunk_core
. This is because it is impossible to disable features offrunk_core
enabled byfrunk_derive
due to the circulardev-dependency
. (features enabled bydev-dependencies
are enabled in all builds, not just tests)Thankfully,
frunk_derive
currently does not actually need to depend onfrunk_core
at all, so I removed the dependency.