Replies: 19 comments 8 replies
-
these both sound pretty useful. I remember seeing one of the version managers supporting some kind of "lts-1" method of using the last major version. I think that could be useful in a CI project where you just want to focus on the most current major releases and not need to update it. |
Beta Was this translation helpful? Give feedback.
-
There's also https://endoflife.date which might be useful for this in some way (at least as a reference) |
Beta Was this translation helpful? Give feedback.
-
yeah maybe if you wanted to say "all non-eol versions of node" with some syntax |
Beta Was this translation helpful? Give feedback.
-
This is really complicated since there are like 4 use-cases I can think of here.
I feel we don't need this anymore with some behavior changes that have gone in. (* this is cached and if only ever use
I get that you only want a single version of a runtime (say only the most recent version of nodejs@16), but I'm not sure I like I know that's what you want, but it feels surprising (in a bad way) to me that this would be the difference in these commands. Maybe I'm wrong. I think there are actually 2 other use-cases that you didn't bring up but are actually what I was more interested to get out of
I think yarnv1 does both of these pretty well with What I need to do is look at other package managers and see what's common and what would work best for rtx. I think "upgrading" is very useful, we just need to figure out what it should mean exactly. |
Beta Was this translation helpful? Give feedback.
-
@jdxcode I wasn't so much referring to keeping a set of already installed fuzzy version up-to-date, more to moving from one fuzzy set to another. I also don't need Points 1-4 in your reply doesn't really cover "requirement" (1) which is being able to automatically move to a new set of installed major versions. If I understand it correctly, 1 is about upgrading a major version to its latest minor update (this seems covered by Regarding 2, I would be fine with building my own "upgrade" task, but I'd ideally have the proper support in rtx so I don't have to hard code things or parse output (e.g. to figure out if a new major version was installed when using |
Beta Was this translation helpful? Give feedback.
-
thanks for clarifying. It sounds like what you want is to be able to do something where effectively the
to this:
is that right? It would be possible to do this today with Also see #221 which is related to this (but doesn't cover that use-case). I think the combination of |
Beta Was this translation helpful? Give feedback.
-
Perhaps the way it would work would be:
Where it would pick the latest version at the same precision that it was before. Does that sound right to you @eproxus ? |
Beta Was this translation helpful? Give feedback.
-
I was imaging being able to have this in my tool versions file:
and then some kind of way of keeping the two previous versions installed, and in addition prune any older minor versions after upgrades. I’m not advocating for a single command so that’s not a requirement. I want to avoid having to manually update scripts or aliases whenever a major version is released. |
Beta Was this translation helpful? Give feedback.
-
something like this?
Where ^N means "subtract 1 from the first number of the latest version". This means for node you would do:
|
Beta Was this translation helpful? Give feedback.
-
See #303 which has a new syntax that I think will be helpful for you here |
Beta Was this translation helpful? Give feedback.
-
@jdxcode Unfortunately for my use case it doesn't seem to work: $ RTX_DEBUG=1 rtx install erlang@latest!-1
[DEBUG] Files: ~/.tool-versions, ~/.config/rtx/config.toml
Installed Plugins: erlang, nodejs, python
[DEBUG] /opt/homebrew/bin/rtx install erlang@latest!-1
[DEBUG] erlang@latest, nodejs@latest, python@latest
[WARN] cannot subtract 1 from latest
rtx erlang@latest!-1 installing
Error:
0: failed to install erlang@latest!-1
1: ~/.local/share/rtx/plugins/erlang/bin/install exited with non-zero status: exit code 1
Location:
src/plugins/script_manager.rs:239
Version:
1.23.7 macos-arm64 (built 2023-03-14)
Suggestion: Run with RTX_DEBUG=1 for more information.
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets. |
Beta Was this translation helpful? Give feedback.
-
this was fixed in #341 |
Beta Was this translation helpful? Give feedback.
-
I solved this by setting multiple versions in the global .tool-versions, and using
The only downside is that
|
Beta Was this translation helpful? Give feedback.
-
#402 is going to lay some groundwork for this I think. With that improvement, calling If you want to point @latest to the newest version you'll run What that would do is delete the old versions if they're not explicitly referenced like with prune. |
Beta Was this translation helpful? Give feedback.
-
It would be also great to have an easy way to upgrade all installed runtimes. |
Beta Was this translation helpful? Give feedback.
-
I would like to see one or many commands that allows me to upgrade a moving window of the X latest major version of a tool. Ideally this would include some pruning/cleanup of outdated minor versions. I'm totally fine if I have to weave together some commands to achieve this though 😄 |
Beta Was this translation helpful? Give feedback.
-
I don't think this is possible. I think I have to reference
You would expect this to upgrade What I could do is make @eproxus I don't know what you mean by this:
|
Beta Was this translation helpful? Give feedback.
-
apologies if someone mentioned this and I just didn't see it our get it at the time, but I just realized one area this can help with which is reusing dependencies. The way asdf/rtx works is that when you install a new version (even just a patch release), it is a totally clean install without any of the previous packages. While that's definitely the safe way to do things, it's a huge pain because you need to reinstall everything. Many plugins have some kind of "default packages" feature to automatically install things, but that's slow and a pain to maintain. I think So it's a hard problem, but I actually think reusing dependencies like this would be really helpful. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to figure out how to do this. For node I:
And I have |
Beta Was this translation helpful? Give feedback.
-
I install multiple major latest version of a tool, e.g.
erlang@25
,erlang@24
anderlang@23
(standard in the Erlang ecosystem is to support the three latest major versions). It's easy to automate upgrading to the latest major versions using rtx:$ alias upgrade_erlang='rtx install erlang@25 erlang@24 erlang@23'
There are two downsides to this approach:
The following are some suggestions for syntax and commands:
To solve (1) it would be nice with some support to install previous major versions.
A
clean
command of sorts would also be useful to solve (2). The command would uninstall all older versions than the latest major versions. An example (again, only a suggestion):Apologies if this is outside the scope of rtx or has already been suggested or solved (if so, please let me know!).
Beta Was this translation helpful? Give feedback.
All reactions