uv icon indicating copy to clipboard operation
uv copied to clipboard

Lock for the duration of tool commands

Open zanieb opened this issue 1 year ago • 4 comments

Feedback from https://github.com/astral-sh/uv/pull/4501#discussion_r1655391958

zanieb avatar Jul 02 '24 02:07 zanieb

Ah this is a bit annoying because now we're locking the directory before we make sure it exists, which I preferred to have happen once we knew we wanted to mutate it so we weren't creating during inspection. I'm not sure how much this matters in practice.

zanieb avatar Jul 02 '24 02:07 zanieb

Ah this is a bit annoying because now we're locking the directory before we make sure it exists, which I preferred to have happen once we knew we wanted to mutate it so we weren't creating during inspection. I'm not sure how much this matters in practice.

Where is this happening in the code? I think it's ok though.

charliermarsh avatar Jul 02 '24 23:07 charliermarsh

@charliermarsh you can see the CI failures are due to the lock being acquired without init first which throws an error. Previously, we waited to call init until we needed do something.

zanieb avatar Jul 02 '24 23:07 zanieb

Ahh sorry yes, that makes sense.

charliermarsh avatar Jul 02 '24 23:07 charliermarsh