Skip to content

Linter: check consistency of dependent features #6571

Open
@foolip

Description

@foolip

We currently have a 'subfeature_earlier_implementation' check, which would if for example the data claims that api.Document.title (document.title) was introduced before api.Document (document) itself.

This is an instance of one feature depending on another, but there are many more like this:

  • APIs that were introduced together, where shipping just one of them would make no sense, for example fetch() without a Response interface (however incomplete) would make no sense.
  • An interface that inherits from another, for example VTTCue inherits from TextTrackCue. api.VTTCue without api.TextTrackCue support is almost certainly an error.
  • An attribute of a certain type requires that type to exist. For example element.classList requires DOMTokenList.

More generalized, we have:

  • Implication: an entry/feature A that depends on another B, i.e., A ⇒ B and !B ⇒ !A (extremely common)
  • Equivalence: entries that must have matching support data, i.e., A ⇔ B (fairly rare)

A lot of this could be derived from Web IDL definitions. The lint for this could have a set of version dependencies, something like this:

[
  ["api.VTTCue", ">=", "api.TextTrackCue"],
  ["api.WindowOrWorkerGlobalScope.fetch", "==", "api.Response"]
]

This was inspired by #6564.

Metadata

Metadata

Assignees

No one assigned

    Labels

    idleIssues and pull requests with no recent activitylinterIssues or pull requests regarding the tests / linter of the JSON files.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions