info: show other installed versions#22241
Conversation
and
both output the same information. I think if we want to highlight other versions it should avoid duplication. Also as a general note @HaraldNordgren: I'm getting concerned that we may make |
I don't quite follow this? Do you mean the star for a linked formula, it's quite hidden imo, not sure how many users look here. It's there for a formula without any siblings as well. So for me I would consider dropping it:
Could be true! Even if I'm spraying PR's at the moment, these are things I have had in the back of my head for the 10 or so years I've been using Homebrew and teaching my team to use brew, so not just randomly adding stuff 🤗 |
|
Or do you mean the location of the keg itself? Yes, that also seems quite specific and not necessarily useful unless the user wants It doesn't tell me if it's linked or not. |
I mean that this section will output multiple kegs for e.g.
Ok good to know 👍🏻 |
@MikeMcQuaid Ah, so you mean collapse the new Maybe, but not necessarily clearer for me as a user. If so, we should add some explanatory text as well! |
Yeh. Or we make that part of the installed versions section and display similar information. I'd like to avoid repetition between sections that are relatively far apart from one another. |
@MikeMcQuaid Moving it down to the installed versions section would look nicer I think, the upper section is quite crowded. However, one complication is that I was not going to show that section when there are no siblings. We need to have a solution that works for any formula. |
Yeh. I think the "installed versions" language makes sense even for the current output? what do you think? |
|
@MikeMcQuaid Updated, looks much nicer! I renamed the section to "Installed" so it wouldn't look weird for formulae without siblings: |
6293853 to
9aa1f4c
Compare
| private | ||
|
|
||
| sig { params(shadower: Pathname).returns(T.nilable(String)) } | ||
| def sibling_keg_name(shadower) |
There was a problem hiding this comment.
It's related to avoid the weird wording where we are warning about shadowing that is not solvable by putt Homebrew earlier in their PATH. This is what it currently looks like, when it's actually shadowed by a sibling:
==> Caveats
The following go executables are shadowed by other commands earlier in your PATH:
go (shadowed by /opt/homebrew/bin/go)
gofmt (shadowed by /opt/homebrew/bin/gofmt)
Running these by name will not invoke the version provided by Homebrew.
There was a problem hiding this comment.
Arguably we could do something something cleaner, I think this is the important part is Run 'brew link go' to switch the active version to this keg, which we could move up to the ==> Installed.
Overall, it's not clear when a formula is not linked. Maybe there should be maybe a warning triangle up here? From a quick glance it looks installed and in effect, which it is not, I have 1.24 linked:
==> go ↑: 1.26.2 → stable 1.26.3 (bottled), HEAD
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Give user info about sibling formulae:
brew lgtm(style, typechecking and tests) with your changes locally?Claud Code, Extra High