uv icon indicating copy to clipboard operation
uv copied to clipboard

add a option that does NOT add uv.lock

Open DinhHuy2010 opened this issue 1 year ago • 6 comments

Hi, could uv add a option not creating a uv.lock file via cli arguments or config file?

DinhHuy2010 avatar Dec 04 '24 07:12 DinhHuy2010

I think you can use the --frozen argument for this.

uv add --frozen flask doesn't create a lock file.

blueraft avatar Dec 04 '24 09:12 blueraft

What would the motivation be for doing this?

charliermarsh avatar Dec 06 '24 00:12 charliermarsh

Basically I am contributing to tqdm, and I use uv for handle dependencies. I think that the tqdm developers are (maybe) not ready for using uv. However, uv are creating uv.lock constantly Previously, I just delete uv.lock file. That is annoying. So add a option that not add uv.lock file (or if it exists, do not update the lock file) will be useful for me.

DinhHuy2010 avatar Dec 06 '24 14:12 DinhHuy2010

I would recommend just adding the uv.lock file to a personal .gitignore

zanieb avatar Dec 06 '24 14:12 zanieb

i.e., in <repo>/.git/info/exclude

zanieb avatar Dec 06 '24 14:12 zanieb

i.e., in <repo>/.git/info/exclude

yes this is what I using here

DinhHuy2010 avatar Dec 06 '24 15:12 DinhHuy2010