-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Add deprecate!
and disable!
to casks
#16292
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, the code looks good. I left a few nits but, of course, feel free to ignore them.
"deprecated" => deprecated?, | ||
"deprecation_date" => deprecation_date, | ||
"deprecation_reason" => deprecation_reason, | ||
"disabled" => disabled?, | ||
"disable_date" => disable_date, | ||
"disable_reason" => disable_reason, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like disabled
and deprecated
are really only necessary on the formula side to aid with HTML generation for formulae.brew.sh
. Probably be a good idea to add a follow-up to enable that for casks too.
- Example disabled formula: https://formulae.brew.sh/formula/aacgain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to slim this, we could easily make the logic on the formule.brew.sh side be deprecation_date <= today
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far! Would be good to get this and the relevant deprecations into 4.2.0 if possible.
@@ -289,7 +289,7 @@ def audit_latest_with_auto_updates | |||
|
|||
sig { params(livecheck_result: T.any(NilClass, T::Boolean, Symbol)).void } | |||
def audit_hosting_with_livecheck(livecheck_result: audit_livecheck_version) | |||
return if cask.discontinued? | |||
return if cask.deprecated? || cask.disabled? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need a new (strict?) audit for usage of caveats :discontinued
.
Co-authored-by: Kevin <[email protected]>
Sorry for the delay, I've had exams this week and have been busy. I've made updates as discussed in the comments. Mainly, I've set it so that the only pre-set reason for casks right now is I know the goal is to add the deprecations before releasing 4.2.0, but they can't be added until all of the old references in homebrew/cask have been fixed, and those can't be updated until this PR has made it into a new tag. So, unless we want to make a new tag pre-4.2.0 (which seems difficult given the deprecation PRs and Ruby 3 rollout), I think we may have to wait to deprecate in the next cycle. @Bo98 @MikeMcQuaid curious to hear your thoughts. I'll update formulae.brew.sh and add an audit to switch to Otherwise, I think this is ready! |
Yeah the Ruby 3 stuff is now non-revertable, and while a off-branch tag is possible this is probably too large/risky for that. |
Co-authored-by: Bo Anderson <[email protected]>
A follow-up necessary as well would be documentation, as well as a policy for how deprecations should work. I was going to propose discussing a rethink of our deprecation policy for formulae at the AGM so we could also talk about cask stuff there too and decide whether it should be the same or different to the formula policy (any thresholds will probably be different at least). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to go ahead and merge so this can sit on |
I opened PRs updating all of the instances in casks (not to be merged until 4.2.0 is released): |
Implemented upstream in Homebrew/brew#16292
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?This PR adds
deprecate!
anddisable!
DSLs to casks. There already is a way to indicate something similar usingcaveats
, so I've prepped us to deprecate that in favor of using the samedeprecate!
anddisable!
DSLs that we use for formulae. To do this, right now usingcaveats { discontinued }
will setdeprecated?
to true, so I've moved all of the checks fordiscontinued?
todeprecated?
ordisabled?
.This PR ended up being way larger than expected, so I've made it a draft to gauge people's thoughts and can split it up into bits if needed.