-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
info: change disabled dates #18551
info: change disabled dates #18551
Conversation
674f539
to
1345056
Compare
I will add some test if the idea is accepted. Also, I am open for a better wording :) |
- Remove useless REMOVE_DISABLED_BEFORE - Add deprecated_period attribute to be able to finetune the disable date - This new attribute is set to :long by default to be backward compatible - This will allow to write an automated script that will disable the formula after the right amount of time This also fixes the issue that the disabled date displayed in brew info right now is way to far in the future (1 year) instead of 6 months (either it's a bug or the code does not aligne with the doc)
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.
Thanks @iMichka! I think one month is too short. I'm not opposed to the DSL but if it's just 3 vs. 6 months I wonder if it helps us much?
I don't get the point of the DSL when we can just I think the automatic disable date is problematic. If we know the date in advance we can just add it to the formula directly? We shouldn't be promising dates we are unable to keep. If that information wasn't available at the time of deprecation then it likely means the formula is complicated and needed a longer indeterminate deprecation period for some reason. |
In most situations, it probably makes sense to just do this. Maybe want to specify in documentation that it is preferred. One minor quirk is that the instant you add ❯ brew info [email protected] | rg disable
Deprecated because it is not maintained upstream! It will be disabled on 2028-04-01. Which will probably confuse users. |
The current code does also some wrong thing IMHO:
So there is 1 year of deprecated state (but our doc says we can go faster than this), and then 1 year of disabled state. I noticed that most of formulae need 2 years to go from first deprecation to removal. That's a very long time for most of them.
Maybe we could get rid of the
This is also something that should be easy to improve. To summarise, I would like to
Not saying my implementation is the best here, I'm open for other ideas |
Agreed. I suggest deprecating the If we can't commit to a disable date, then we probably shouldn't be deprecating a formula. |
I couldn't disagree more, I'm afraid. Dates are useful for people to be able to plan against. If the date is "wrong" then this is still vastly more useful than doing a rug pull on people with no meaningful advance notice. Many people (and projects) do not pay attention to deprecations that they don't have dates for. Ideally we'd have dates for our own
I'd rather we kept it around.
Agreed. It would be good to fix this.
I agree with 1. and 2. of these high-level goals 👍🏻. I think the dates should be ideally used for automation but, if they are wrong and we deprecate/disable/remove after that date: no big deal. We should make sure we don't remove things before their stated dates. |
I agree. But I'm not sure how keeping
|
Most, not all. Additionally: it's fine for deprecations to occur immediately for end-users because it's just a warning for them. Something like A |
Note that this is equivalent to the current disable! date: "2024-12-31", because: "reason" deprecates the formula immediately and then tells the user that it will be disabled on |
Yeh. I don't think that's a great DSL because it don't think it reads as being deprecated right now. Maybe I care about this and no-one else does, though 😁. Might be nice to at least have something like: disable! date: "2024-12-31", deprecate_date: "2024-06-31", "because: "reason" (with potentially better naming). If we had something like that that was obvious enough: yeh, I think we could consider deprecating |
The current situation is: we are providing them a rug and pulling it early nearly every time (but no maintainer was aware until user reports came in as visibility was poor). So "wrong" can be harmful as we've given them a date to plan against that we never intended to meet. Even the 6 month thing hasn't been universal. We applied 3 months for the Python libraries and agreed on that before starting the deprecation process.
This could work by changing one line of code ( deprecate! date: "2025-01-01"
disable! date: "2026-01-01", because: :abc |
Seems reasonable to me as may as well retain the original dates. We already have entries in JSON API which align to them ❯ curl -sL "https://formulae.brew.sh/api/formula/[email protected]" | jq 'with_entries(select(.key | startswith("deprecat") or startswith("disabl")))'
{
"deprecated": true,
"deprecation_date": null,
"deprecation_reason": "unsupported",
"disabled": false,
"disable_date": "2024-11-21",
"disable_reason": null
} Also would help webpage, e.g. https://formulae.brew.sh/formula/[email protected]#default
|
Needs a couple more lines of changes and AST is currently |
Ah ok - my asumption was Probably worth functionally supporting both orders even we end up preferring a specific order cosmetically - taps aren't required to run |
Closing in favour of #18661. I'm fine with having the possibility to use both together to bring clarity. There are still a few tweaks I would like to make to the doc but we can discuss that later. |
This also fixes the issue that the disabled date displayed in brew info right now
is way to far in the future (1 year) instead of 6 months (either it's a bug or the code does not aligne with the doc)
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?