-
Notifications
You must be signed in to change notification settings - Fork 821
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
feat: mark current resolved versions in asdf list
output
#762
Conversation
Thanks for the PR! Can you explain what these changes do? And do you have an issue in the issue tracker for this bug/feature? Also, it looks like the format check failed. |
On Thu, Jul 16, 2020 at 9:51 PM Trevor Brown ***@***.***> wrote:
Thanks for the PR! Can you explain what these changes do?
Hi Trevor, thanks for the message.
It's just a small helpful feature (common w rbenv and rmv). It basically
shows the current version when listing your installed plugins/packages. It
marks the current version w an asterisk of a particular plugin. Currently,
you will have to run a separate command like "asdf current".
Sample runs,
$ asdf list elixir
1.10.2-otp-22
*1.10.3-otp-22
$ asdf list
elixir
1.10.2-otp-22
*1.10.3-otp-22
erlang
*22.3.2
nodejs
*12.18.2
php
*7.4.8
ruby
2.5.8
*2.6.6
2.7.1
And do you have an issue in the issue tracker for this bug/feature?
nope. this is just a feature i'm fond of.
Also, it looks like the format check failed.
ah, that, I do not know why. really.
If you look at the report, you will know why i do not know :)
Thanks Trevor and thanks for asdf
--botp
|
This seems similar to #617 |
asdf list
output
asdf list
outputasdf list
output
Just a note, this flag will likely break people who are parsing this as white-space delimited. |
On Fri, Jun 17, 2022 at 3:53 PM James Hegedus ***@***.***> wrote:
Just a note, this flag will likely break people who are parsing this as
white-space delimited.
maybe we may put the flag after the version number so it may not intrude w
existing scripts/parsers?
anyway, once we finalize on the format, the rest would be easy.
|
Sorry, I was incorrect in this. I thought we were prefixing with either I will rebase and merge as there doesn't seem to be any objection to this feature, thanks. |
asdf list
outputasdf list
output
Here is the output from the rebased code:
Notably, it doesn't list if a version is missing, and I'm not sure if we want the output to do that or not. For instance, I am in my system
Any thoughts on this, or do we agree that |
Interestingly the test suites on Ubuntu are failing on installing Fish or something🤷 EDIT: it is the Elvish binary download URL failing. Seems something is going on with their setup. |
Merged due to elvish failures being an external issue that will eventually be resolved. Ran tests locally without issue. EDIT: I reported the Elvish issue and it has since been resolved. I re-ran the failed jobs on the latest commit on this PR and they succeeded. |
@jthegedus why did you select this PR over #1192? They are almost identical PRs. Unless there is something we want from #1192 it can be closed.
I think regardless of formatting this will break existing parsers. I suggest with stick with whatever formatting will be the most useful going forward (we're already going to have to bump to at least 0.11.0 because this feature has been merged). |
This for the As for |
I had forgotten about that. I guess
I'll take care of that one. Thanks! |
Changing this to Additionally, Currently we have: # shows selected version of installed versions of tools
➜ asdf list
bats
*1.7.0
# shows installed plugins
➜ asdf plugin list all
updating plugin repository...HEAD is now at df7ef4a chore: format README.md
...
bats *https://github.com/timgluz/asdf-bats.git
...
# after #1192 - shows installed versions
➜ asdf list all bats
...
1.6.0
1.6.1
*1.7.0 But perhaps it should be: # shows selected version of installed versions of tools
➜ asdf list
bats
1.6.0
* 1.7.0
# shows installed plugins
➜ asdf plugin list all
updating plugin repository...HEAD is now at df7ef4a chore: format README.md
...
* bats https://github.com/timgluz/asdf-bats.git
...
# after #1192 - shows installed versions
➜ asdf list all bats
...
* 1.6.0
1.6.1
* 1.7.0 |
@jthegedus another option might be trailing stars? e.g.
That way if you want the version you know it's always first column, and if you want installed status, it's maybe the second column. All this reminds me of |
A suffix marker might be the go. I would also like to see |
@jthegedus I have created #1291 for this. |
Just wanted to give feedback that this change broke my parser. (I just subscribed to #1291 to follow along.) |
Sorry about that, unfortunately some breakages are unavoidable as we move towards a better design. Thanks for your patience. |
This pr seems introduced stack overflow and stack when running some shim command in specific directory (for me, it was |
@tomocrafter I just commented on #1372 this morning. That sounds like the same issue you are experiencing. This is due to an issue in the go plugin specifically. For anyone who may be reading this: Plugins callbacks should never invoke asdf commands themselves. Doing so may result in infinitely loops of asdf -> plugin -> asdf -> plugin. Most plugins do not do this, but a few do. Features like this one may cause this to manifest as a stackoverflow or infinite loop. |
@Stratus3D Thank you for detailed explanation! and it really makes sense. |
I don't know how helpful "me too" comments are, but just another voice that this broke an automated system I have for checking and updating my environment. Would be really nice to have old behavior available behind a flag for changes like this, but I know implementing that kind of thing is a pain. On the whole, thanks for the good work on this project. |
@sjml If you want to follow the context/discussion of the separation of human- and machine-readable output formats, you can read and subscribe to #646 and #1291. |
Could asdf disable visual cues like this when it detects its output is piped in and not directed to user-facing terminal? Thank you |
hi @log2, it is difficult and unreliable to detect pipes in shells, especially when passed thru ssh. like @jthegedus, i too, do not like --porcelain behavior+name similar to git. i'd prefer --format=format. or maybe, as of now, we can try --delimiter |
Summary
updated code to pass thru basic workflow checks
Closes #617