-
Notifications
You must be signed in to change notification settings - Fork 219
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
Remove send+sync requirement if not parallel #674
Conversation
d53219b
to
99e4d62
Compare
@@ -27,7 +27,7 @@ derivative = "1" | |||
hashbrown = "0.6.0" | |||
hibitset = { version = "0.6.1", default-features = false } | |||
log = "0.4" | |||
shred = { version = "0.9.3", default-features = false } | |||
shred = { version = "0.10.1", default-features = false } |
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.
shred 0.10.1
needs to be deployed before this PR can be merged
Cargo.toml
Outdated
@@ -39,7 +39,6 @@ uuid = { version = "0.7.4", optional = true, features = ["v4", "serde"] } | |||
[features] | |||
default = ["parallel"] | |||
parallel = ["rayon", "shred/parallel", "hibitset/parallel"] | |||
nightly = ["shred/nightly"] |
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.
A breaking change so I bumped the minor version of specs
We could also leave this feature in and just make it nightly = []
if we don't want to bump to 0.16
just yet - then I can just make this PR bump to 0.15.2
Whatever works for specs
!
b1c766c
to
9b12b28
Compare
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.
Heya, the changes in both PRs look good to these eyes; could you also add a test that the non-"parallel"
version builds with a !Send + !Sync
type? Maybe just checking that adding a struct NonSend(pub Rc<u32>)
to the World
would suffice.
Heya, took a while to get back, but the changes in both PRs look good to me. In terms of repository ownership, I don't yet feel like I'm "the one", else I'd be happy to take them. |
@chinedufn tbh I have never felt like being "the one" either and have been bit afraid of stepping on other peoples toes accidentally, so I am happy to let you be it. I can participate on things though! |
@chinedufn I've tried getting $ cargo test --no-default-features --workspace
# ..
error: aborting due to 55 previous errors
# .. Could you check what's blocking that? I haven't merged |
examples/cluster_bomb.rs
Outdated
@@ -1,9 +1,11 @@ | |||
extern crate rand; |
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.
Opted for the quick approach to get things passing with the parallel feature disabled by just panicking.
I thought that the work of making the examples work in parallel and non-parallel could be left for the future since these wouldn't have worked in not(parallel)
before anyway
examples/full.rs
Outdated
@@ -1,4 +1,6 @@ | |||
#[cfg(feature = "parallel")] |
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.
Same idea here - quick and dirty approach of panicking when not parallel
@@ -0,0 +1,14 @@ | |||
#![cfg(not(feature = "parallel"))] |
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.
@azriel91 addresses #674 (review) - thanks for the feedback!
ah oops, I did similar changes in #677 (but didn't force push to your branch -- in case you still wanted it). oh. just discovered why -- |
This reverts commit 1ed2912.
e29ef4a
to
b4e83ce
Compare
Goal: Support There is a test in
@chinedufn @WaDelma I think it's good to have both of you review this (again). The summary above should capture the options I've tried. |
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.
Looks great - thanks for making this much more robust than what I originally had!
} | ||
|
||
#[test] | ||
fn non_send_component_is_accepted() { |
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 realized that's no test for a storage that isn't |
If the Or am I missing something here? |
ah that's correct ✌️ -- it backs onto |
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.
LGTM
bors r+ |
Build succeeded |
Closes #673