Skip to content
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

Show dedicated message for tools with no entrypoints #4694

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

charliermarsh
Copy link
Member

Summary

Closes #4688.

Test Plan

❯ cargo run tool install ruff
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/uv tool install ruff`
warning: `uv tool install` is experimental and may change without warning.
Resolved 1 package in 136ms
Installed 1 package in 3ms
 + ruff==0.5.0
No entrypoints to install for tool `ruff`

@charliermarsh charliermarsh requested review from zanieb and konstin July 1, 2024 13:43
@charliermarsh charliermarsh added cli Related to the command line interface preview Experimental behavior labels Jul 1, 2024
@zanieb
Copy link
Member

zanieb commented Jul 1, 2024

Should we... fail? I feel like it doesn't "mean" anything to install a tool with no entry points.

@charliermarsh
Copy link
Member Author

I mildly prefer not failing.

@zanieb
Copy link
Member

zanieb commented Jul 1, 2024

Separately, I just noticed your example: we should probably have a message for installation of Ruff's executable.

@zanieb
Copy link
Member

zanieb commented Jul 1, 2024

If there are no provided executables or entry points.. what is installing a tool?

@charliermarsh
Copy link
Member Author

Ruff is fixed in #4693.

@charliermarsh
Copy link
Member Author

If there are no provided executables or entry points.. what is installing a tool?

It puts the tool in a dedicated environment on your machine. In theory you could run that environment if you wanted an isolated environment with the tool? I don't know the use-case but failing seems user-hostile. Anyway you can decide, I don't feel the need to keep discussing.

@charliermarsh
Copy link
Member Author

One data point:

❯ pipx install requests
Note: Dependent package 'charset-normalizer' contains 1 apps
  - normalizer

No apps associated with package requests. Try again with '--include-deps' to include apps of dependent packages, which
are listed above. If you are attempting to install a library, pipx should not be used. Consider using pip or a similar
tool instead.

@charliermarsh
Copy link
Member Author

That seems like two votes for erroring, so I'll do that.

Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I think we can revisit later, but yeah right now the environments are intended not to be user-facing and I'd recommend some other command for the no-entrypoints use case.

@charliermarsh
Copy link
Member Author

Yeah all good!

@charliermarsh charliermarsh merged commit 305868c into main Jul 1, 2024
47 checks passed
@charliermarsh charliermarsh deleted the charlie/empty branch July 1, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incomplete message for uv tool install azure-cli --prerelease=allow
2 participants