uv icon indicating copy to clipboard operation
uv copied to clipboard

Minor false positive warning for uvx reinstall

Open bluss opened this issue 1 year ago • 3 comments

Original command:

uvx --reinstall --with dist/*.whl pytest

Modified command (to try to avoid the warning):

uvx --reinstall-package my-package-name --with dist/*.whl pytest     

Both have the following warning. Especially in the second modified case, this is a false positive? Because the reinstall is wanted for the extra dependency added with --with.

warning: Tools cannot be reinstalled via `uvx`; use `uv tool upgrade --reinstall`
to reinstall all installed tools, or `uvx package@latest` to run the latest
version of a tool

The command is a recipe for running tests vs the freshly built wheel -- from the project directory. Reinstall to ensure the new wheel is used even if version etc did not change. Using uv 0.3.3.

bluss avatar Aug 24 '24 11:08 bluss

I think --refresh might be intended here.

charliermarsh avatar Aug 24 '24 11:08 charliermarsh

Oh, thanks, I think refresh works for the use case, looks like it. I've just been keen to ensure the wheel is actually reinstalled. (With that fix, there is no issue here).

bluss avatar Aug 24 '24 11:08 bluss

I think the warning needs to be tweaked.

charliermarsh avatar Aug 24 '24 11:08 charliermarsh