Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Use lazy_static 1.2.0, remove twoway/pcmp and require rust 1.24.1+ #118

Merged
merged 1 commit into from
Jan 25, 2019

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Jan 19, 2019

Attempt number two :)

Before this patch, multipart got into an impossible sitation with it's dependencies. It errs with:

error: failed to select a version for `lazy_static`.
    ... required by package `multipart v0.15.4`
versions that meet the requirements `>= 1.0, < 1.2.0` are: 1.1.0, 1.0.2, 1.0.1, 1.0.0

all possible versions conflict with previously selected packages.

  previously selected package `lazy_static v1.2.0`
    ... which is depended on by `ring v0.13.5`
    ... which is depended on by `cookie v0.11.0`
    ... which is depended on by `rocket_http v0.4.0`
    ... which is depended on by `rocket v0.4.0`
    ... which is depended on by `multipart v0.15.4

This is due to ring 0.13.3 bumping lazy_static to 1.2.0 to avoid a soundness bug. This patch fixes this problem by requiring at least rust 1.24.1.

In addition, I noticed that the feature sse4 was depending on twoway/pcmp, but that has been removed.

Before this patch, multipart got into an impossible sitation with
it's dependencies. It errs with:

```
error: failed to select a version for `lazy_static`.
    ... required by package `multipart v0.15.4`
versions that meet the requirements `>= 1.0, < 1.2.0` are: 1.1.0, 1.0.2, 1.0.1, 1.0.0

all possible versions conflict with previously selected packages.

  previously selected package `lazy_static v1.2.0`
    ... which is depended on by `ring v0.13.5`
    ... which is depended on by `cookie v0.11.0`
    ... which is depended on by `rocket_http v0.4.0`
    ... which is depended on by `rocket v0.4.0`
    ... which is depended on by `multipart v0.15.4
```

This is due to ring 0.13.3 bumping lazy_static to 1.2.0 to avoid
a [soundness bug](rust-lang-nursery/lazy-static.rs#117).
This patch fixes this problem by requiring at least rust 1.24.1.

In addition, I noticed that the feature sse4 was depending on
`twoway/pcmp`, but that has been [removed](bluss/twoway#8).
@erickt
Copy link
Contributor Author

erickt commented Jan 19, 2019

Note that I filed a ticket with rouille to also raise their minimum required version, which is why you reverted back from the minimum version being 1.26.1.

cc @abonander and @FauxFaux

@abonander
Copy link
Owner

Considering how often this crate runs into dependency issues with Rust versions, I'm thinking of maybe only supporting latest stable or maybe latest stable - 3 releases or something. I know some people still need older version support though.

It might be worthwhile to break multipart into subcrates for each integration so they can evolve separately. I don't know if I like that prospect a whole lot since it's more crates to maintain.

@erickt
Copy link
Contributor Author

erickt commented Jan 19, 2019

Sure, whatever works for you! I'm just trying to get that buggy lazy_static out of my dependency tree.

@FauxFaux
Copy link
Contributor

I apologise for my part in causing this situation! Personally, I track stable, and gaze in awe at people who attempt to maintain support for older versions. I thought we might be at the point where it was kind of possible to do so, but apparently not. :|

@abonander
Copy link
Owner

I'll take the discussion on minimum version and subcrates into its own issue (and if you know any potential stakeholders please let them know to look out for them).

This change seems reasonable enough although it is technically a breaking change so it'll be a minor version bump.

@erickt
Copy link
Contributor Author

erickt commented Jan 23, 2019

Glad to hear it. Regarding your dependencies,
rouille accepted my patch to bump the min rust version to 1.24.1. I looked at your top 5 other dependencies, and the only other one that pins to a version, serenity, pins to 1.25.

@abonander abonander merged commit b88520f into abonander:master Jan 25, 2019
@erickt erickt deleted the bump-version branch January 25, 2019 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants