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

MCP: move compiler/ crates to stable Rust #358

Closed
1 of 3 tasks
est31 opened this issue Sep 13, 2020 · 9 comments
Closed
1 of 3 tasks

MCP: move compiler/ crates to stable Rust #358

est31 opened this issue Sep 13, 2020 · 9 comments
Labels
major-change A proposal to make a major change to rustc T-compiler Add this label so rfcbot knows to poll the compiler team

Comments

@est31
Copy link
Member

est31 commented Sep 13, 2020

Proposal

Refactor the compiler to remove all #![feature(...)] uses from rustc crates residing in compiler/.

From a high level point of view, rustc itself deals in data: text in, binary out. This process doesn't need nightly features from a technical perspective, yet the compiler uses many. When rustc was created, Rust was an unstable language and lacked many features to build large powerful programs. Now, 5 years after 1.0, many stable features have arrived, and there is a growing ecosystem featuring multiple large codebases in stable.

Making compiler/ crates build on stable has a set of benefits:

  • Easier onboarding of outside contributors from the stable Rust ecosystem as they have to learn less new features/mannerisms.

  • Unstable features sometimes still have rough edges and soundness holes. You need to be aware of these issues when using them, making it harder for contributors.

  • Unlock usage of beta std by rustc without needing cfg(bootstrap) (also proposed by @matklad here). Already a subset of this proposal unlocks that (only removing unstable std/library features).

  • As rustc is crates.io-ified, outside users might want to use components of rustc. Often those outside users want to use stable themselves

Note that I don't propose:

  • moving off beta to e.g. stable compilers as the default stage0 and supporting bootstrap from the last 2 compiler versions instead of the last one only (cargo can do this already).

  • stopping use of nightly features altogether. std crates and tests still need nightly features. RUSTC_BOOTSTRAP is still needed for those, although maybe x.py won't set it for compiler/ crates any more to enforce the rule (alternatively one can think about enforcing it in tidy).

I have prior experience with moving nushell to stable: nushell/nushell#362 . I can help out in the implementation of this proposal, if it's wanted.

Mentors or Reviewers

If you have a reviewer or mentor in mind for this work, mention then
here. You can put your own name here if you are planning to mentor the
work.

Process

The main points of the Major Change Process is as follows:

  • File an issue describing the proposal.
  • A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

@est31 est31 added T-compiler Add this label so rfcbot knows to poll the compiler team major-change A proposal to make a major change to rustc labels Sep 13, 2020
@rustbot
Copy link
Collaborator

rustbot commented Sep 13, 2020

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

@rustbot rustbot added the to-announce Announce this issue on triage meeting label Sep 13, 2020
@spastorino spastorino removed the to-announce Announce this issue on triage meeting label Sep 16, 2020
@nikomatsakis
Copy link
Contributor

Procedural note: I think this would be a good MCP for a "full FCP".

@est31
Copy link
Member Author

est31 commented Jan 21, 2021

People didn't like it. I don't think an FCP is needed. Eventually, I hope it will be adopted but an FCP closing this will only harm future discussions, so I retract it before it can be done. Thanks.

@est31 est31 closed this as completed Jan 21, 2021
@steveklabnik
Copy link
Member

People didn't like the idea of moving to stable, or doing an FCP?

@est31
Copy link
Member Author

est31 commented Jan 23, 2021

@steveklabnik the idea of moving to stable. It was quite unpopular in the zulip thread. I can't recall a single compiler team member be in support of the MCP in that thread, but it was months ago so please correct me if I'm wrong. In the meantime I haven't been contacted by anybody to second the MCP or anything, but if a compiler team member wants this to be reopened because they feel this has a real chance of being accepted, please feel free to do so.

@ghost
Copy link

ghost commented Jan 23, 2021

My impression was this was thought to be stretching too far the limits of what's
plausible given the requirements, so it might be popular if it were plausible.

@jyn514
Copy link
Member

jyn514 commented Jan 23, 2021

I don't agree with the impression. The main objection was that this would prevent dogfooding unstable compiler features: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/MCP.3A.20move.20compiler.2F.20crates.20to.20stable.20Rust.20compiler-team.23358/near/209926534

@ghost
Copy link

ghost commented Jan 23, 2021

Surely that would be popular. Which as I recall was left unanswered by a
parallel discussion on fast-tracking or having a more measured approach to
stabilizing features, a task which was not at all implied to be linear or
simple. And ultimately it's many of those 'dog-fooded' features which are
necessary.

@jyn514
Copy link
Member

jyn514 commented Jan 23, 2021

Please take discussion about whether or not we should accept this MCP to the Zulip thread. This is a tracking issue, not for technical discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-change A proposal to make a major change to rustc T-compiler Add this label so rfcbot knows to poll the compiler team
Projects
None yet
Development

No branches or pull requests

6 participants