Skip to content
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 minimal support for rustc-rayon #212

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Dec 9, 2021

This adds basic IntoParallelIterator support for the rustc-rayon fork of rayon, as needed by rust-lang/rust#90842 (cc @pierwill). The optional dependency is commented as "internal" for rustc's use alone, and we should feel free to make breaking changes like semver-bumps in coordination with compiler updates.

@cuviper cuviper requested a review from bluss December 9, 2021 20:02
Copy link
Member

@bluss bluss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, seems sensible.

@bluss
Copy link
Member

bluss commented Dec 9, 2021

This makes me wonder about more hacky ideas, could rustc just patch in an alternative fork of rayon from the top of its cargo projects? I don't think the cargo patch feature can do exactly that, at least not without requiring version/crate name to stay identical.

@cuviper
Copy link
Member Author

cuviper commented Dec 9, 2021

Cargo patches affect the whole workspace, and I'm not sure we would want to force that fork everywhere since it lags behind. Really, we should do away with that fork, but that requires more work and nobody is really using the parallel rustc anyway...

@bluss
Copy link
Member

bluss commented Dec 9, 2021

Yes I guess the fork would have to be a lot more careful about exactly what it's changing if it should work, it would need to be designed for being used that way.

@pierwill
Copy link

pierwill commented Dec 9, 2021

This is amazing! Thank you @cuviper. :)

@cuviper
Copy link
Member Author

cuviper commented Jan 6, 2022

Yes, this has IntoParallelIterator for IndexMap, &IndexMap, &mut IndexMap, IndexSet, and &IndexSet.

@cuviper
Copy link
Member Author

cuviper commented Jan 6, 2022

Confirmed on zulip that it is working with the "rustc-rayon" feature properly enabled. :)

I'm merging this, then I'll check other pending PRs and see about publishing a release.

@cuviper cuviper merged commit 921df7b into indexmap-rs:master Jan 6, 2022
@cuviper cuviper deleted the rustc-rayon branch July 18, 2023 02:41
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.

3 participants