Stream: edition

Topic: edition rfc: "editions are meant to be adopted"


nikomatsakis (Feb 17 2021 at 15:31, on Zulip):

I'm trying to finalize the Edition RFC this morning so I can get it open. If you take a look at the draft, you will see that the "motivation" section contains a number of "headings", each of which state a core principle of how we are approaching editions.

nikomatsakis (Feb 17 2021 at 15:32, on Zulip):
nikomatsakis (Feb 17 2021 at 15:32, on Zulip):
nikomatsakis (Feb 17 2021 at 15:32, on Zulip):
nikomatsakis (Feb 17 2021 at 15:32, on Zulip):
nikomatsakis (Feb 17 2021 at 15:35, on Zulip):

I am adding one more, based on my comment here, that

nikomatsakis (Feb 17 2021 at 15:36, on Zulip):

Editions are meant to be adopted

Editions go out of their way to preserve older code and ensure that it still compiles. Out of respect for our users, we don't want to force anyone to upgrade an edition on any particular schedule, and we wish to ensure that folks can still use older releases successfully. Nonetheless, all things being equal, we would prefer that folks adopt the new edition, just as we would generally prefer for people to move to the "latest and greatest" ways of using Rust once they are available. This belief can sometimes affect our policy. For example, we might issue lint warnings in older editions which can only be resolved by adopting a newer edition (or marking the lint as #[allow], of course).

nikomatsakis (Feb 17 2021 at 15:36, on Zulip):

I'm curious to hear how that paragraph reads to people.

simulacrum (Feb 17 2021 at 15:55, on Zulip):

I think it's the right call; I was wary about general policy initially but I think it will inform this 2021 edition's policy so should be noted.

scottmcm (Feb 17 2021 at 16:19, on Zulip):

I might actually go stronger than just "prefer". Perhaps something along the lines of "we expect that all actively-developed code will move to the new edition well before the next one comes out".

scottmcm (Feb 17 2021 at 16:26, on Zulip):

Similarly, "For example, we will not do extra work to expose features on previous editions, as those old editions exist to support old code, not new code. Features won't be artificially restricted from those editions, if support there is natural, but it's completely acceptable for newly added features to only work on the latest edition".

Josh Triplett (Feb 17 2021 at 17:19, on Zulip):

@nikomatsakis This seems reasonable to me, as long as we never take it as a hard requirement that all actively developed projects will migrate in a timely fashion. It seems acceptable to lint in previous editions; lints can be disabled or capped. But any reasoning starting with "everyone will have migrated by now, so..." may be problematic.

nikomatsakis (Feb 17 2021 at 17:22, on Zulip):

I would consider that an exceptional case

nikomatsakis (Feb 17 2021 at 17:22, on Zulip):

I have secret hopes of being able to kill some old patterns some day

nikomatsakis (Feb 17 2021 at 17:23, on Zulip):

But tbh I just see editions as one tool of many to being able to do that

nikomatsakis (Feb 17 2021 at 17:23, on Zulip):

i.e., along with lints, deprecations, opening PRs, and all kinds of other things

nikomatsakis (Feb 17 2021 at 17:23, on Zulip):

the basic idea being "we can kill some old pattern if nobody is relying on code that uses it"

nikomatsakis (Feb 17 2021 at 17:23, on Zulip):

I don't actually know what pattern I would want to kill, I just want us to avoid getting stuck maintaining the rust equivalent of trigraphs for 22 years

Josh Triplett (Feb 17 2021 at 17:24, on Zulip):

As Rust becomes more widely adopted, our ability to use crater to say "nobody does xyz" will become increasingly limited. There will be code crater doesn't see.

Josh Triplett (Feb 17 2021 at 17:26, on Zulip):

I absolutely understand the desire to avoid maintaining a compatibility mechanism if nobody is using it.

Josh Triplett (Feb 17 2021 at 17:28, on Zulip):

I just want to be careful with the assumption that everyone will upgrade, because as we grow we'll likely get subsets of users who for whatever reason never want to upgrade their code, and want it to keep building with newer Rust. One person's trigraph may be another person's Python 3.

nikomatsakis (Feb 17 2021 at 17:37, on Zulip):

Josh Triplett said:

As Rust becomes more widely adopted, our ability to use crater to say "nobody does xyz" will become increasingly limited. There will be code crater doesn't see.

I wouldn't propose such a change based solely on crater results

nikomatsakis (Feb 17 2021 at 17:37, on Zulip):

anyway, it's fine, we're arguing future hypotheses

nikomatsakis (Feb 17 2021 at 17:37, on Zulip):

I don't disagree with any of your points :)

nikomatsakis (Feb 17 2021 at 17:37, on Zulip):

and I'm in no rush to make hard changes

nikomatsakis (Feb 17 2021 at 17:37, on Zulip):

that said, even windows 7 is no longer maintained :)

Lokathor (Feb 17 2021 at 20:33, on Zulip):

don't worry: in 20 years we won't have Rust 2.0, but some upstart kid is gonna take all the lessons and mistakes we learned by then, make the Grime language, and slowly put us all out of work. Then we truly will be C++.

nikomatsakis (Feb 17 2021 at 21:48, on Zulip):

I can't wait for this day!

Last update: May 07 2021 at 07:15UTC