Skip to content

Ancestors affecting a key's computed status is difficult to understand #2897

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

Open
ddbeck opened this issue Apr 24, 2025 · 2 comments
Open

Ancestors affecting a key's computed status is difficult to understand #2897

ddbeck opened this issue Apr 24, 2025 · 2 comments
Labels
bug Something isn't working tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings

Comments

@ddbeck
Copy link
Collaborator

ddbeck commented Apr 24, 2025

Summary

compute-baseline checks a compat key's ancestors when resolving a key's status (that is, support for x.y.z is based on the intersection of x.y.z., z.y, and x). This is expected, but surprising, behavior. When this happens, it's quite difficult to see this result and understand why.

Example

For example, given the key api.Bluetooth.requestDevice, we get this status:

baseline: false
support:
  chrome_android: 56

But actual support shown for that key on the MDN compat table (and the BCD for that key alone) looks quite different (from Bluetooth: requestDevice() method - Web APIs | MDN):

Image

The cause of this is the parent Bluetooth interface (from Bluetooth - Web APIs | MDN), which is only partially supported:

Image

Related issues and PRs

This originally came up in https://github.com/web-platform-dx/web-features/pull/1376/files#r1675836543, where Linux support prevented the feature from having a higher level of support. It was suggested that we might want the option to override that, file as #1690.

This issue is about how it's hard to tell that it has happened at all.

@ddbeck ddbeck added bug Something isn't working tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings labels Apr 24, 2025
@ddbeck
Copy link
Collaborator Author

ddbeck commented Apr 24, 2025

Some ideas on how to approach this problem:

  • Print BCD notes into dist files
  • Annotate keys in dist files that have a different status because of an ancestor (and, ideally, which one)

@ddbeck
Copy link
Collaborator Author

ddbeck commented Apr 24, 2025

cc: @fiji-flo, @LeoMcA I tracked down the cause of the troublesome key. See https://github.com/web-platform-dx/web-features/pull/1376/files#r1675836543 for a bit of background. The very short summary: this is expected, but we could make it easier to understand why it has happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings
Projects
None yet
Development

No branches or pull requests

1 participant