nabijaczleweli / cargo-update

A cargo subcommand for checking and applying updates to installed executables
MIT License
1.22k stars 42 forks source link

Housekeeping - nothing to see here, move along #90

Closed mati865 closed 6 years ago

mati865 commented 6 years ago
  1. std::env::home_dir() was lying about it's functionality: https://github.com/rust-lang/rust/pull/51656
  2. As always: new features/bugs, bug fixes, performance improvements. It would be boring but regex gained ability to detect and use SIMD on supported machines: https://github.com/rust-lang/regex/commit/e455d53108495579baa187258794a4eae6ddf8b4 Before:
     elfx86exts target/release/cargo-install-update 
    MODE64 (call)
    CMOV (cmovb)
    SSE1 (movups)
    SSE2 (movdqu)

    After:

     elfx86exts target/release/cargo-install-update
    MODE64 (call)
    CMOV (cmovb)
    SSE1 (movups)
    SSE2 (movdqu)
    AVX (vxorps)
    AVX2 (vpcmpeqd)
    SSSE3 (pshufb)
  3. Clippy wants to help saving those miliseconds
  4. Rustfmt now sorts lines which begin with use keyword, there is option (disabled by default) to do the same for extern crate

I can squash commits if you want.

mati865 commented 6 years ago

I'd some, mainly stylistic, nitpicks, (would feel silly to immediately revert an entire commit at merge, when I put my dumb pedantry in :Р).

That's the point of the reviews 😉 I'll address it on the Monday probably.

Maybe instead of blindly bumping minimal versions it'd better to add CI checking whether the crates in said versions are buildable https://github.com/rust-lang/cargo/issues/5657?

nabijaczleweli commented 6 years ago

I'm not sure if I'm extremely dumb (yes), extremely tired (hardly), or if the way the feature's explained just doesn't click for me (probably) but I somehow don't get what it does?

mati865 commented 6 years ago

Versions declared in Cargo.toml are in fact "minimal supported versions". Cargo will automatically use latest compatible version, consider this example:

[dependencies]
foo = "1.0"

You are declaring this crate will work with versions: 1.0 >= foo < 2.0. It's not always possible to use latests versions like Cargo does by default so we have two hypothetical environments:

  1. Cargo uses latest foo = "1.1", everything works fine.
  2. Cargo uses older but declared to work foo = "1.0", everything works fine.

Then you start using foo::x without noticing it was added in foo = "1.1" and Cargo.toml still points to foo = "1.0":

  1. Cargo uses latest foo = "1.1", everything works fine.
  2. Cargo uses older but declared to work foo = "1.0" and user gets the compilation error.

There is ongoing effort to mitigate it by adding CI job with -Z minimal-versions to make sure we are not lying about supported dependencies versions. Another less nice solution is to always declare latest versions, "if we support only the latest version we cannot be lying about earlier versions".

mati865 commented 6 years ago

Updated libgit2 should fix https://github.com/nabijaczleweli/cargo-update/issues/92

nabijaczleweli commented 6 years ago

Released in v1.6.2.