Skip to content

extract index and bit-set related types into their own crate #50592

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

Closed
nikomatsakis opened this issue May 10, 2018 · 7 comments · Fixed by #64778
Closed

extract index and bit-set related types into their own crate #50592

nikomatsakis opened this issue May 10, 2018 · 7 comments · Fixed by #64778
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented May 10, 2018

Right now they live in rustc_data_structures, but we can rely on crates now. It'd be nicer if they were over in a rust-lang crate, which would let us optimize, test, and otherwise develop them independently from rustc. (It'd also be useful in projects like borrow-check). As you can see in this comment, the current plan is to begin doing this "in tree" and only later decide whether to move out of tree.

@spastorino spastorino self-assigned this May 10, 2018
@XAMPPRocky XAMPPRocky added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. labels Oct 2, 2018
@saleemjaffer
Copy link
Contributor

saleemjaffer commented Feb 12, 2019

@nikomatsakis I would like to work on this. I'm a newbie to rust but would like to give this a shot!

@saleemjaffer
Copy link
Contributor

saleemjaffer commented Feb 13, 2019

@spastorino Should we use an existing crate in rust-lang-nursery for this purpose? Or should we create a new github project for this purpose similar to https://crates.io/crates/sparse-bitfield

@eddyb
Copy link
Member

eddyb commented Feb 13, 2019

cc @nnethercote

@spastorino
Copy link
Member

@rustbot release-assignment

@flavius
Copy link

flavius commented Jun 24, 2019

I'm new to the rust compiler, having played on-off with rust for the past two years, and I'd like to get my feet wet with this. Also, what's the go-to communication channel in case I have questions?

cc @nikomatsakis
cc @eddyb

Just added the stage1 toolchain to rustup.

@nnethercote
Copy link
Contributor

@flavius: Some people are on Discord, see here. Unfortunately, some other people are on Zulip, which isn't mentioned on that page. But Discord is a decent place to start.

@nikomatsakis
Copy link
Contributor Author

We discussed this a bit on Zulip, and we had the idea that we should start by just creating the crate in tree before we talk about moving it out of tree.

Here are some mentoring instructions for how we would go about it:

  • Create a directory src/librustc_index or whatever we decide to call it.
  • Copy src/librustc_data_structures/Cargo.toml into that directory and adapt it -- probably deleting most all the dependencies and just tweaking the name.
  • To start, I would make add rustc_index as a dep of rustc_data_structures and then pub use its API, so that downstream code doesn't have to change.
  • Then move over the types one by one -- I'd probably start with the "index" code as all the other types use this Idx trait as a kind of common abstraction.
  • Once this works, I personally would prefer to remove the pub use from librustc_data_structures bit by bit and update the downstream crates. I don't like having multiple paths that lead to the same thing, it's confusing.

I think that should be it!

@nikomatsakis nikomatsakis changed the title extract SparseBitMatrix, SparseBitSet, and other bit-related types into a rust-lang-nursery crate extract index and bit-set related types into their own crate Jul 12, 2019
@bors bors closed this as completed in 22bc9e1 Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants