rye icon indicating copy to clipboard operation
rye copied to clipboard

rye pin should give a more verbose error

Open Woovie opened this issue 1 year ago • 0 comments

Issue

When running rye pin and there's some sort of issue with your version, it's very vague.

❯ rye --version
rye 0.32.0
commit: 0.32.0 (e1b4f2a29 2024-03-29)
platform: linux (x86_64)
self-python: [email protected]
symlink support: true
uv enabled: true

❯ rye pin 3.12.3
error: unsupported/unknown version for this platform

Is this because 3.12.3 isn't available in rye? is it something to do with my AMD64 Arch Linux? I do not have a clue on how to proceed with the current error message.

Recommended solutions

Rye should specifically say what the issue is. I assume what this command does is scan across available versions from a cpython list of packages that the current rye version is aware of. While that is nice, I think it might be nice to say:

  • If the version doesn't exist at all for any environment: Python version 3.12.3 not available in Rye
  • If the version does exist for cpython, but not for this environment: Python version 3.12.3 is not available in this environment

Comments

Some other distinguishing scenarios may be nice as well. It's hard to know exactly what is wrong. In my particular case, it's definitely just 3.12.3 not being in Rye yet, but I can't tell that from the error.

Woovie avatar Apr 16 '24 18:04 Woovie