We have odeprecated and odisabled as a Homebrew/brew method that can be used to deprecate and disable functions before they are removed. We should add a DSL to do the same thing for Homebrew/homebrew-core. It should:
brew doctor and when you brew install, brew reinstall or brew upgrade the formulabrew extract should be able to extract this formula and remove the disablingbrew install, brew reinstall or brew upgradeWe may want to also consider a tap_deprecations.json or similar instead of a formula DSL to allow easier extracting and to be able to trivially and quickly output all deprecated or disabled formulae.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Hey, can I work on this issue? 🙋🏽♀️
@vidusheeamoli, please go ahead! 👍
Ideally the same DSL should also be available for casks.
Hello everyone!
I am sorry for the delay, I was busy with my mid-semester exams last week. I'm now completely focusing on this issue.
I've realised that there can be 2 ways to go forward with the solution (If I understand correctly):
deprecate method in the Formula classutils/deprecate.rb and include it in the Formula class.What should the course of action be in this case?
I could also use some pointers on how to disable CI tests for deprecated formulae.
Thank you!
I think we'll probably need a combination of both. A common function which can then be used by both formulae and casks.
I could also use some pointers on how to disable CI tests for deprecated formulae.
This should probably be in brew test-bot/brew cask ci via a simple call to Formula#deprecated?/Cask#deprecated?.
I think we'll probably need a combination of both. A common function which can then be used by both formulae and casks.
Makes sense! Thank you :)
Hello, I have some questions again:
A deprecated formulae should also deprecate all their dependents
For more readability, let us assume that the formula being deprecated is X.
I can easily access the list of all dependencies of X but to deprecate all the dependents of X, i plan on iterating through all formulae and check if they have X as a dependency. This is a brute force solution and might also increase the complexity. Another disadvantage of this approach would be the inefficiency to revoke the deprecation. Is there any other efficient method to do this?
Hope this question isn't too ambiguous.
Thanks!
Also, would it be okay if I make a WIP pull request, so that it is easier to provide more context about the doubts I have?
@vidusheeamoli sure, you can just create a draft PR for now.
@vidusheeamoli Agreed, go for it! I would say just do whatever the simplest solution is now and we can work on improving performance together. Looking forward to it!
Most helpful comment
This should probably be in
brew test-bot/brew cask civia a simple call toFormula#deprecated?/Cask#deprecated?.