Range linter: Disallow ranged values after 2020-01-01
What type of issue is this?
Linter issue
What is the issue?
Ranged values are currently allowed for browser versions released two years or earlier.
What behavior were you expecting?
If you set the linter to four years or earlier, it still passes. We should enforce that, so that we can make the guarantee that BCD will always report a real (non-ranged) version for as many years as possible.
What version(s) of BCD is the issue present in?
- [X] The current BCD release
- [X] The current version of the
mainbranch
Do you have anything more you want to share?
It doesn't pass for:
- 5 years: 832 errors (≤79 for Edge, ≤83 for Chrome, ≤72 for Firefox, and ≤13.1 for Safari would no longer be allowed)
- 6 years: 913 errors (≤18 for Edge would no longer be allowed)
- 7 years: 930 errors
- 8 years: 953 errors
- 9 years: 957 errors
- 10 years: 1793 errors (≤37 for WebView Android would no longer be allowed)
cc @foolip @ddbeck
We should enforce that, so that we can make the guarantee that BCD will always report a real (non-ranged) version for as many years as possible.
Agreed. Though I'd like to suggest going one step further and pinning those versions that define the 4-year cut off, rather than having a rolling X-year window. That way no new uncertainties would emerge (e.g., a year from now, you wouldn't be allowed to add a ranged value to a 2020 release).
For reference, Philip and Daniel discussed using a cut off before: https://github.com/mdn/browser-compat-data/pull/19146#pullrequestreview-1342350432
Unfortunately, a recent update to the web extensions data has now introduced a range that is within two years, so we are no longer able to switch to a longer date at this time. Currently, it is only one single range, so we may be able to prioritize researching a proper version number and replace the range.
There is only one webextensions issue to fix in order for us to set this to four years (instead of two).
Versions - 1 problem (1 error, 0 warnings):
✖ webextensions.api.menus.OnClickData.srcUrl - Error → version_added: "≤95" is NOT a valid version number for chrome
Ranged values are only allowed for browser versions released two years or earlier (on or before Fri Jan 27 2023 00:00:00 GMT+0100 (Mitteleuropäische Normalzeit)). Ranged values are also not allowed for browser versions without a known release date.
https://github.com/mdn/browser-compat-data/pull/25963 extended this to four years.
@Elchi3 I tested locally and we can extend to five years. Should we?
PS: Extending to six years yields 230 issues.
This isn't resolved by #27068. That PR moves the rolling window to five years, not 1 January 2020.
Apologies, I misread a comment above thinking a fixed date wasn't possible.
2020-01-01 would require replacing all Edge ≤79 versions, among others.
For now, the earliest date we could set is 2020-05-20, to allow these Chrome ≤83 statements (2020-05-20).
Should we start with that date, and adjust the linter to throw an Error if the cut off date is not equal to the latest ranged value release date + 1 day?
Should we start with that date, and adjust the linter to throw an Error if the cut off date is not equal to the latest ranged value release date + 1 day?
That sounds good to me.
https://github.com/mdn/browser-compat-data/pull/27166 bumps the cut off date to 2020-05-19.
(Unfortunately, the part about outdated cut off date is a bit tricky, and would require further changes to the linting architecture, so I skipped that part for now.)