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

Deprecate Homebrew/homebrew-command-not-found #17380

Closed
wants to merge 1 commit into from

Conversation

MikeMcQuaid
Copy link
Member

This doesn't seem to be used at all nowadays:
https://formulae.brew.sh/analytics/brew-command-run/365d/

As an official tap, it has overhead on e.g. RuboCop upgrades and a presence in Homebrew/brew CI, manpage, etc. that no longer seems to be warranted.

If there's enough 👍🏻 to do this: I'll add various odeprecated or odisabled calls to Homebrew/homebrew-command-not-found and archive the repository.

This doesn't seem to be used at all nowadays:
https://formulae.brew.sh/analytics/brew-command-run/365d/

As an official tap, it has overhead on e.g. RuboCop upgrades and a
presence in Homebrew/brew CI, manpage, etc. that no longer seems to be
warranted.
@MikeMcQuaid MikeMcQuaid requested a review from a team May 28, 2024 08:46
@bevanjkay
Copy link
Member

I don't think this would show on the command-run analytics, because it's not invoked directly.
Unless we're looking for the command-not-found-init command, which may not be used as opposed to reading the docs.

In saying that, I've personally never used it.

@MikeMcQuaid
Copy link
Member Author

I don't think this would show on the command-run analytics, because it's not invoked directly.

I guess my thinking is: none of the relevant commands show up in the analytics.

In saying that, I've personally never used it.

This is an added datapoint: from a show of hands at the last Homebrew AGM iirc no maintainers used this.

@carlocab
Copy link
Member

This is an added datapoint: from a show of hands at the last Homebrew AGM iirc no maintainers used this.

I remember a few people raising their hands (including me...)

@MikeMcQuaid
Copy link
Member Author

I remember a few people raising their hands (including me...)

@carlocab My bad, maybe it was homebrew-autoupdate people didn't use?

Any idea why there's no results showing up in analytics here? Would you be happy to take on any improvements to e.g. not committing data to repo without PRs?

@carlocab
Copy link
Member

@carlocab My bad, maybe it was homebrew-autoupdate people didn't use?

Yes, that one I recall no one raising their hands for.

Any idea why there's no results showing up in analytics here?

No 🥲

Would you be happy to take on any improvements to e.g. not committing data to repo without PRs?

Yep, happy to take on improvements, but I'd like some assistance with continuing maintenance (even if it's just poking me on Slack to fix things).

@MikeMcQuaid
Copy link
Member Author

Any idea why there's no results showing up in analytics here?

No 🥲

@carlocab Which commands do you manually run and when, just so I understand?

Yep, happy to take on improvements, but I'd like some assistance with continuing maintenance (even if it's just poking me on Slack to fix things).

Yup, fair.

Will leave this open for now in case anyone else feels strongly it shouldn't be part of Homebrew.

@cho-m
Copy link
Member

cho-m commented May 28, 2024

Any idea why there's no results showing up in analytics here?

I think we only collect analytics for the new AbstractCommand subclasses?

cmd_class = Homebrew::AbstractCommand.command(cmd)
if cmd_class
command_instance = cmd_class.new
Utils::Analytics.report_command_run(command_instance)

Homebrew/homebrew-command-not-found (and probably other official tap commands) have not been refactored.

@MikeMcQuaid
Copy link
Member Author

Good catch, thanks @cho-m!

@carlocab
Copy link
Member

carlocab commented May 28, 2024

@carlocab Which commands do you manually run and when, just so I understand?

I rarely run it manually these days. When I do, it's usually to run brew which-formula because I want to know which formula provides a command.

However, I do have it set up as a command-not-found handler, via https://github.com/ohmyzsh/ohmyzsh/tree/5e59d21e5465ec0694441f41ff0acf1ddf4de187/plugins/command-not-found.

For example, if I try to run a command that's not available:

❯ ghc
The program 'ghc' can be found in the following formulae:
  * ghc
  * [email protected]
  * [email protected]
  * [email protected]
  * [email protected]
Try: brew install <selected formula>

❯ ldc2
The program 'ldc2' is currently not installed. You can install it by typing:
  brew install ldc

Copy link
Member

@razvanazamfirei razvanazamfirei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have used it briefly it in the past, but not in the last 2-ish years.

Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use this too, but only the which-formula command (which I've aliased to brew which) and not the shell handler part.

However, I don't use it frequently enough that I think it needs to be official. If we deprecate it here, I'll likely keep a personal fork of it around for my personal use

@apainintheneck
Copy link
Contributor

Would it be worth updating the command to the use the new DSL so we can collect stats before deprecating it? That would give us a better idea if people are actually using it. I don't use the command though so personally I'm fine with removing it.

@MikeMcQuaid
Copy link
Member Author

Would it be worth updating the command to the use the new DSL so we can collect stats before deprecating it?

Yes, I think this is the best thing for now.

Going to mark this as draft for now until we've done that.

@MikeMcQuaid MikeMcQuaid marked this pull request as draft May 31, 2024 07:55
@reitermarkus
Copy link
Member

I'm also using this. And of course, since most of the software I use is already installed by my dotfiles, command-not-found is very rarely actually called. command-not-found-init shouldn't do any network request given it's called when initializing a new terminal like shellenv.

@MikeMcQuaid
Copy link
Member Author

Have opened PRs to gather analytics: Homebrew/homebrew-command-not-found#156 (and others). Closing this until at least 30 days after merge so we can see what usage levels are like.

@MikeMcQuaid MikeMcQuaid closed this Jun 6, 2024
@MikeMcQuaid MikeMcQuaid deleted the deprecate_command_not_found branch June 6, 2024 13:23
@github-actions github-actions bot added the outdated PR was locked due to age label Jul 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants