esp-idf-template icon indicating copy to clipboard operation
esp-idf-template copied to clipboard

Remove Cargo.lock from gitignore

Open torkleyy opened this issue 2 years ago • 8 comments

I think it should be version controlled since it's a binary project, not a library.

torkleyy avatar Aug 23 '23 13:08 torkleyy

Yes I've heard about this rule before but I have mixed feelings from following it. IMO it results in more maintenance than gains - as users have to issue cargo update right after the generated template to upgrade to latest versions of the crates.

@SergioGasquez @MabezDev @Vollbrecht thoughts?

ivmarkov avatar Aug 23 '23 15:08 ivmarkov

That's not true unless you add Cargo.lock to this repo, right?

torkleyy avatar Aug 23 '23 19:08 torkleyy

The intention wasn't to lock versions in this repository - since this is not really a binary project, but a template for one. The goal is to achieve full reproducibility for the projects generated from this template, which can only be achieved if they commit the exact versions.

torkleyy avatar Aug 23 '23 19:08 torkleyy

OK. I would still defer to the other committers for opinion. If they are for it - I'm fine with removing this one line - esp-template - for one - does not have it indeed.

ivmarkov avatar Aug 23 '23 19:08 ivmarkov

I have no strong opinion on that. The only concern is when updating the template that PR's should not accidentally contain a Cargo.lock file in it. Other than that i am fine with it.

Vollbrecht avatar Aug 28 '23 10:08 Vollbrecht

I think putting Cargo.lock into the gitignore at the repo root (outside of the template) would prevent that.

torkleyy avatar Aug 28 '23 11:08 torkleyy

Here is some interesting new meta information about the topic https://blog.rust-lang.org/2023/08/29/committing-lockfiles.html

Vollbrecht avatar Aug 30 '23 11:08 Vollbrecht

Same for me, I don't have any hard opinion on this. But since it has been proposed I am happy to merge it and, if in the future we change or minds we can remove it.

SergioGasquez avatar Aug 31 '23 08:08 SergioGasquez