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

Decide on Rust 1.18 vs 1.31 requirement #154

Closed
shepmaster opened this issue Aug 14, 2019 · 6 comments
Closed

Decide on Rust 1.18 vs 1.31 requirement #154

shepmaster opened this issue Aug 14, 2019 · 6 comments
Labels
feedback requested User feedback desired on a design decision maintenance Keeping the wheels turning

Comments

@shepmaster
Copy link
Owner

shepmaster commented Aug 14, 2019

syn/quote/proc-macro2 just updated to version 1.0 and now require Rust 1.31+. Upgrading would break our version requirements.

I chose the current 1.18 as basically "how early could we go without being terrible". My idea was to support as many Rust versions as possible in order to allow a broad range of projects to use SNAFU.

It may not be the case that anyone cares about these older versions, though. Rust 1.31 is nearly 9 months old, and is 5 stable releases behind. I have a gut feeling that most people track stable or a few stable versions behind. 1.31 also has the notable benefit of being the release of Rust 2018 and NLL, things that people hotly anticipated and wanted.

As a user of SNAFU, I'd appreciate it if you'd vote on one of the following comments to provide feedback on what Rust versions we should support.

@shepmaster shepmaster added maintenance Keeping the wheels turning feedback requested User feedback desired on a design decision labels Aug 14, 2019
@shepmaster
Copy link
Owner Author

shepmaster commented Aug 14, 2019

Please add a 👍 to this comment if you'd like SNAFU to continue supporting Rust 1.18+.

@shepmaster
Copy link
Owner Author

Please add a 👍 to this comment if you'd be OK with SNAFU only supporting Rust 1.31+.

@BurntSushi
Copy link

For crates I maintain that a lot of people depend on, I try to be fairly conservative, and my rough ballpark heuristic is "lag about a year behind latest stable." I think 9 months is just fine personally.

@shepmaster shepmaster pinned this issue Aug 14, 2019
@shepmaster shepmaster changed the title Decide on Rust version requirements Decide on Rust 1.18 vs 1.31 requirement Aug 14, 2019
@Dylan-DPC-zz
Copy link

Faced with a similar situation earlier, I often solve it by asking the question "is there any language feature from those versions (1.18 to 1.30) that you depend on? if no, bump + major release

@shepmaster
Copy link
Owner Author

@Dylan-DPC I've read your comment a few times over the last few hours, but I'm still confused. I'll try restating this specific problem with the hopes that I've communicated something poorly.

SNAFU has a dependency on syn/quote/proc-macro2 (which I'll shorten to just "syn" for the rest of this comment). Those dependencies have recently released version 1.0, and chosen to only guarantee compatibility with Rust 1.31 and do not compile on Rust 1.18. The previous versions had compatibility back to Rust 1.15, but SNAFU itself required Rust 1.18.

SNAFU does nothing and stays on the current version of syn

Pro:

  • supports Rust 1.18+
  • more people/projects can use SNAFU

Con:

  • annoyance to the people that will have to compile multiple versions of syn
  • maybe cause issues with parsing future Rust syntax

SNAFU upgrades to syn 1.0

Pro:

  • only build one version of syn, once most crates are updated
  • our code can upgrade to Rust 2018 and be simplified

Con:

  • Can no longer use SNAFU with versions of Rust before 1.31.

Implementation details

I'm in the camp that believes that bumping the minimum Rust version corresponds to a semver-incompatible version change. If we upgraded to syn 1.0 today, then our minimum Rust version is changed, and we would need to release SNAFU 0.5 (since we haven't yet hit 1.0). That version number bump is dependent on when/if we do such a change, of course.


is there any language feature from those versions (1.18 to 1.30) that you depend on?

No, there are no language features between Rust 1.18 and 1.30 that SNAFU requires.

if no, bump + major release

I don't follow why the answer "no" would mean this. What would the answer "yes" mean?

@shepmaster
Copy link
Owner Author

Thanks everyone! Since there are no dissenting opinions, I see no reason not to upgrade.

@shepmaster shepmaster unpinned this issue Sep 11, 2019
tjkirch added a commit to tjkirch/snafu that referenced this issue Sep 24, 2019
tjkirch added a commit to tjkirch/snafu that referenced this issue Sep 24, 2019
The new minimum supported Rust version will be 1.31.  This removes the
rust_1_30 feature, which was used to opt into better support for
higher-than-minimum versions of Rust; it's no longer needed because there we
have no features that require beyond Rust 1.31.  Code that was conditional on
rust_1_30 is now required.

Compatibility tests for 1.30 were replaced with 1.31.

Background: shepmaster#154
tjkirch added a commit to tjkirch/snafu that referenced this issue Sep 24, 2019
The new minimum supported Rust version will be 1.31.  This removes the
rust_1_30 feature, which was used to opt into better support for
higher-than-minimum versions of Rust; it's no longer needed because there we
have no features that require beyond Rust 1.31.  Code that was conditional on
rust_1_30 is now required.

Compatibility tests for 1.30 were replaced with 1.31.

Background: shepmaster#154
tjkirch added a commit to tjkirch/snafu that referenced this issue Sep 24, 2019
The new minimum supported Rust version will be 1.31.  This removes the
rust_1_30 feature, which was used to opt into better support for
higher-than-minimum versions of Rust; it's no longer needed because there we
have no features that require beyond Rust 1.31.  Code that was conditional on
rust_1_30 is now required.

Compatibility tests for 1.30 were replaced with 1.31.

Background: shepmaster#154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback requested User feedback desired on a design decision maintenance Keeping the wheels turning
Projects
None yet
Development

No branches or pull requests

3 participants