-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opt-into / opt-out of automatic re-sync with uv run
?
#7165
Comments
Ooooh it seems |
I think it's gonna be hard for us to achieve both (1) and (2). We're trying to avoid reading state from disk like that. We could, it's just more of a departure from how things work today. I think |
\cc @zanieb who may have opinions on point (1). |
I think we're getting consistent feedback that But... I don't think an operating mode that touches the virtual environment if it doesn't exist but not otherwise makes a ton of sense for general use — it seems hard to teach. I guess this would be a variant like
I think that we can do better here. We don't want you to have to persist the changes to your environment nor should you have to specify
Would (2) address your use case? |
@zanieb -- Does |
I would be surprised if it locked. I was also surprised Looking for consistency with other things... the
Which seems reasonable. For |
uv 0.4.5.
Hi, thanks for uv, it's hot! 🌋
I recently started using the higher-level commands of uv, like
uv sync
instead ofuv pip ...
. Working great 🚀uv sync
makes things much, much faster within my workflow 😄I also started using
uv run
. And there's something about it that I both love and dislike: the fact that it automatically re-syncs the env each time I use it.format
task (which uses Ruff 😋) to format the code, and uv will automatically create the venv, lock and install the dependencies, and run the specified command. That is awesome.uv run
, it resets these dependencies to the versions saved in the lock file.I am aware of the
--with
option (which is awesome too!), but I would really prefer "persisting" my changes in the venv, so that I don't have to use--with x==y
in each subsequent commands. So, ideally I would like to have a way to opt-out of this automatic re-sync, which would result in the following behavior:(venv path is determined with
UV_PROJECT_ENVIRONMENT
and usual fallback(s))Do you think you can consider such a thing 🤔?
Happy to elaborate on my use-case, as maybe there's a different/better workflow that uv suggests.
The text was updated successfully, but these errors were encountered: