brew icon indicating copy to clipboard operation
brew copied to clipboard

cmd/outdated: display warning for disabled casks

Open bevanjkay opened this issue 1 year ago • 8 comments

  • [x] Have you followed the guidelines in our Contributing document?
  • [x] Have you checked to ensure there aren't other open Pull Requests for the same change?
  • [x] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [ ] Have you written new tests for your changes? Here's an example.
  • [ ] Have you successfully run brew style with your changes locally?
  • [ ] Have you successfully run brew typecheck with your changes locally?
  • [ ] Have you successfully run brew tests with your changes locally?

This is an initial pass at warning users when they have casks installed that are disabled so that they can consider alternatives, and be alerted that a cask is leaving soon.

I am not 100% sure on the best place to position the warning yet, so the first option here is to show the list when running brew outdated. I'm not sure if this should be behind a flag, but it should probably be suppressed with the --quiet flag. The other location could be when running brew upgrade or brew update, but I'm hesitant for it to be too naggy.

bevanjkay avatar Apr 22 '24 03:04 bevanjkay

The other location could be when running brew upgrade or brew update, but I'm hesitant for it to be too naggy.

I think formulae just do this on brew doctor. I think it's worth emulating what formulae do here and being consistent across the too and adding more "noise" if we feel it is needed.

Doing so on brew update feels justifiable and maybe even brew upgrade if that's insufficient.

MikeMcQuaid avatar Apr 22 '24 12:04 MikeMcQuaid

To be clear, are you suggesting not listing these on brew outdated and consider brew update instead?

From memory one of the main motivators for adding deprecate/disable to Casks was that we could then alert users when something they have installed becomes disabled. Otherwise I don't see a significant benefit over just removing them how we used to.

My concern is that it does become too naggy if it shows all the time, and in cases where the user would like to keep the application but not the Caskfile, we may need a way to remove it from Homebrew without removing the application?

bevanjkay avatar Apr 22 '24 13:04 bevanjkay

To be clear, are you suggesting not listing these on brew outdated and consider brew update instead?

Yes (and before that brew doctor).

My main consideration is: let's be consistent with what we do for formulae and casks.

MikeMcQuaid avatar Apr 22 '24 13:04 MikeMcQuaid

Thanks @MikeMcQuaid - a list of disabled casks/formula is already being output when running brew doctor. I do think it would be useful for users to be alerted more prominently.

I can re-work this PR to include some output when running brew update, or would you prefer to leave this for now?

bevanjkay avatar Apr 29 '24 01:04 bevanjkay

Thanks @MikeMcQuaid - a list of disabled casks/formula is already being output when running brew doctor.

Thanks for checking!

I do think it would be useful for users to be alerted more prominently. I can re-work this PR to include some output when running brew update, or would you prefer to leave this for now?

I don't have strong feelings about whether we do either or both. If we do outdated: probably need to think about how brew outdated --json handles this.

@Homebrew/maintainers any thoughts here on how we are more noisy about deprecated formulae/casks?

MikeMcQuaid avatar Apr 29 '24 07:04 MikeMcQuaid

Waiting to see if anybody had any thoughts here before going any further, but if there's no appetite for more warnings, I'm okay to leave it for now.

bevanjkay avatar May 09 '24 06:05 bevanjkay

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar May 31 '24 00:05 github-actions[bot]

I still have this on my radar, but probably won't get to it for a couple of weeks, so happy for this to close and reopen when I have some more time.

bevanjkay avatar May 31 '24 01:05 bevanjkay