Skip to content
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

Require added+removed versions to make sense when ignoring ranges #10710

Merged
merged 1 commit into from
Jun 11, 2021

Conversation

foolip
Copy link
Collaborator

@foolip foolip commented Jun 2, 2021

No description provided.

@github-actions github-actions bot added the linter 🏡 Issues or pull requests regarding the tests / linter of the JSON files. label Jun 2, 2021
@foolip foolip marked this pull request as ready for review June 2, 2021 07:30
@foolip foolip requested a review from ddbeck as a code owner June 2, 2021 07:30
@foolip
Copy link
Collaborator Author

foolip commented Jun 2, 2021

@ddbeck @Elchi3 I'd love your thoughts on this. I put this together while thinking about #10653 (comment), and this stricter lint would cause some changes in that PR to fail.

Since MDN now drops the ≤ I think BCD should require the data to be sensible even if ignoring ranges.

@Elchi3
Copy link
Member

Elchi3 commented Jun 3, 2021

I think this makes sense. I definitely didn't think about this when we changed the MDN rendering. Good catch!

queengooborg added a commit to queengooborg/browser-compat-data that referenced this pull request Jun 6, 2021
@foolip
Copy link
Collaborator Author

foolip commented Jun 8, 2021

@Elchi3 do you feel like reviewing?

@ddbeck
Copy link
Collaborator

ddbeck commented Jun 8, 2021

I'm kinda neutral on this idea, though I won't stand in the way of it. I agree that it's not good when the data looks like this, but it's not clear to me that this is a presentation problem, rather than a problem with the data itself.

@ddbeck ddbeck removed their request for review June 8, 2021 16:37
@Elchi3
Copy link
Member

Elchi3 commented Jun 9, 2021

So, in terms of the data this makes things only stricter by disallowing the following case, right?

version_added: "≤37"
version_removed: "37"

It is valid data but by disallowing it would then prompt the BCD author to avoid "≤37" leading to a real value that doesn't involve "≤" (which is better data).

Other side effects here? If not, then I would say we should go with this.

@ddbeck
Copy link
Collaborator

ddbeck commented Jun 9, 2021

Other side effects here? If not, then I would say we should go with this.

The one I can think of is someone adding less-accurate data (e.g., setting false instead) to satisfy the linter. Though I guess there won't be that many people working on resolving ranged values anyway, and they all know better, so maybe it's not worth worrying about. 🤷‍♂️ I guess we can proceed on this.

@foolip
Copy link
Collaborator Author

foolip commented Jun 9, 2021

@Elchi3 there's also cases like this that this would disallow:

version_added: "≤37"
version_removed: "4.4"

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That case seems reasonable to disallow to me, too.

Let's do this. (we just had a release, so if this is problematic, I guess we would notice way before next Thursday).

@Elchi3 Elchi3 merged commit 62a7e5c into mdn:main Jun 11, 2021
@foolip foolip deleted the test-versions-without-range branch June 11, 2021 08:50
@foolip
Copy link
Collaborator Author

foolip commented Jun 11, 2021

Thanks @Elchi3!

@vinyldarkscratch now that this is landed, it would be good to revisit that WebView SVG weirdness and resolve it in a way that doesn't break this lint rule.

queengooborg added a commit to queengooborg/browser-compat-data that referenced this pull request Nov 7, 2021
This PR adds real values for WebView Android for the `MouseEvent` API.  The data was mirrored from Chrome/Safari and determined based upon the WebKit version.  I'm not able to set the version added to "≤37" because the version removed is "37" -- the linter will fail due to the changes made in mdn#10710.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter 🏡 Issues or pull requests regarding the tests / linter of the JSON files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants