nabijaczleweli / cargo-update

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

Add Cargo.lock to the repository (if there exist one) #10

Closed mzji closed 7 years ago

mzji commented 7 years ago

As per the Cargo reference, for programs, Cargo.lock should be in the repository.

nabijaczleweli commented 7 years ago

But this is a library

mzji commented 7 years ago

Wait, there is a [[bin]] section in the Cargo.toml, so it at least contains one binary... right? Edit: Most third-party cargo subcommands in the official list have a Cargo.lock in their repository, for example: cargo-tree/Cargo.lock.

nabijaczleweli commented 7 years ago

There's a [[bin]] exactly because it's a library.

nabijaczleweli commented 7 years ago

Re: edit: that's because cargo-tree isn't a library

mzji commented 7 years ago

cargo-edit is a library and contains a binary, its repo contains a Cargo.lock.

nabijaczleweli commented 7 years ago

Maybe killercup views it primarily as an exec, secondarily as a library, v0v. This is a library first, an exec second (think of the exec like an example, which it basically is (and should be)).

mzji commented 7 years ago

Ah, OK, so maybe Cargo.lock should be added into the .gitignore , just like Clippy

nabijaczleweli commented 7 years ago

It is in .gitignore

mzji commented 7 years ago

Ah got it. Thanks for the explain! Not very familiar with the syntax of .gitignore , almost misinterpreted.

nabijaczleweli commented 7 years ago

I like to use an inverted .gitignore - everything is ignored except the files specified with ! before them