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

filetime pin is outdated #202

Closed
kpcyrd opened this issue May 27, 2019 · 3 comments
Closed

filetime pin is outdated #202

kpcyrd opened this issue May 27, 2019 · 3 comments

Comments

@kpcyrd
Copy link

kpcyrd commented May 27, 2019

I've noticed I can't update to the latest tar release because it depends on filetime 0.2.6, while notify has an explicit pin on filetime 0.2.5, preventing the update.

Please consider pushing an update.

@passcod
Copy link
Member

passcod commented May 27, 2019

We can't. Filetime has pushed their minimum rustc version to 1.32 as of 0.2.6, while notify guarantees to be compatible down to 1.26.1 without a major version bump.

@passcod passcod closed this as completed May 27, 2019
@passcod
Copy link
Member

passcod commented May 27, 2019

See #201

@matklad
Copy link

matklad commented Aug 21, 2019

Hm, pin dependencies in Cargo.toml are usually not a good idea.

If a project depends on notify 0.4 and on some other library A that has filetime = "0.2.6", than Cargo will just refuse to build that project, and the only solution would be to get rid of either notify or A.

Note that you don't have to pin filetime to 0.2.5 to make sure that notify works with older Rusts. If you specify filetime = "0.2.5" in the Cargo.toml, Cargo can still use 0.2.5, even if 0.2.6 is already published. By default, it will pull 0.2.6 unless there's an existing lockfile, but you can override this with cargo update --package filetime --vers 0.2.5 --precise.

That is, clients of notify will still be able to use notify with old Rust, but it's the client responsibility to make sure they have filetime 0.2.5 in the lockfile.

The practical problem here is building the crate on CI: without lockfile, Cargo will pull the newest filetime, and it will break CI for old Rust. The work around here is to actually use a lockfile when testing with older rusts. See how Cargo.lock.min is used to test once_cell against an old Rust: https://github.com/matklad/once_cell/blob/c62ee6629513d948bce53130ca168d2f856276ab/.travis.yml#L19-L26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants