esp-rs / esp-idf-template

A "Hello, world!" template of a Rust binary crate for the ESP-IDF framework.
373 stars 43 forks source link

Remove Cargo.lock from gitignore #150

Open torkleyy opened 10 months ago

torkleyy commented 10 months ago

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

ivmarkov commented 10 months ago

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?

torkleyy commented 10 months ago

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

torkleyy commented 10 months ago

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.

ivmarkov commented 10 months ago

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.

Vollbrecht commented 10 months ago

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.

torkleyy commented 10 months ago

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

Vollbrecht commented 10 months ago

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

SergioGasquez commented 10 months ago

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.