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

Why does 'ls-remote' start from the bottom of versions and not the top? #3216

Closed
raphaellueckl opened this issue Oct 6, 2023 · 12 comments
Closed

Comments

@raphaellueckl
Copy link

[Sorry for removing the issue template, but none of the points made sense for this ticket.]

I always wonder why 'ls-remote' doesn't start from the newest version, which mostly would allow for almost instant CTRL+C without waiting half a minute for the complete list. Is there any particular reason for this? Usually I am always too little bothered to mention it somewhere but today I thought that this has been the case for several years now and it finally should be discussed. :)

Seriously, who wants to install the node versions below 1? Below 10? Below 15?.... That ordering should be descending in my humble opinion.

Thanks for this awesome product! 🚀

@ljharb
Copy link
Member

ljharb commented Oct 6, 2023

Because that’s how they’re listed on the remote server, so it would be a lot slower to reverse the entire download - you’d end up waiting more time.

@ljharb
Copy link
Member

ljharb commented Oct 9, 2023

i mean you can just list the latest major, or --lts, etc, so usually that’s what i do when I’m not trying to see everything.

@ljharb

This comment was marked as off-topic.

@raphaellueckl
Copy link
Author

@ljharb Thx for responding. If it's the remote that delivers the list in a badly sorted way, can we somehow raise a ticket there? Wherever that is.

@ljharb
Copy link
Member

ljharb commented Nov 22, 2023

You certainly could file an issue on nodejs/release requesting the order be inverted - although that would probably break lots of version manager users, so it’s only really practical as a separate index file, which probably won’t be worth it since it’d be two sources of truth.

@raphaellueckl
Copy link
Author

😢😭😭

@kuchta
Copy link

kuchta commented Nov 24, 2023

@raphaellueckl I'm actually quite glad that it is this way, since on my machine the listing is instant and I don't have to scroll some 18 pages to get to the latest versions. But if you really prefer it in reverse order nvs seems to have it that way.

@ljharb
Copy link
Member

ljharb commented Jul 29, 2024

You can get this by nvm ls-remote | tac, for example (or a workaround if tac isn't present on your system).

For the reasons described above, I don't think this is something nvm should worry about.

@ljharb ljharb closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2024
@kuchta
Copy link

kuchta commented Jul 29, 2024

@ljharb It's not the same, since your command has to wait for the completion to show anything...

@ljharb
Copy link
Member

ljharb commented Jul 29, 2024

@kuchta because of the ordering in the source data, that’s impossible to avoid, for nvm or for users.

@kuchta
Copy link

kuchta commented Jul 30, 2024

@ljharb I don't know from where the source data come from, but I'm quite sure it can be improved by first class support in the command, since getting even few thousands lines could be get in a blink of an eye...

@ljharb
Copy link
Member

ljharb commented Jul 30, 2024

@kuchta nvm ls-remote | tac works super fast for me, so i doubt it can be improved in the tool. The source data is https://nodejs.org/dist/index.tab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@ljharb @kuchta @raphaellueckl and others