Skip to content

Proposed solution to make grammar changes less disruptive #477

Open
@tobie

Description

@tobie

Goal

Allow faster and easier changes to the grammar while being less disruptive to specs and tools relying on WebIDL.

Issue

Grammar changes are particularly problematic as removed syntax causes parsers to fail. This has the following consequence:

  • Previously passing idlharness tests start to fail or error.
  • ReSpec specs rendered in the client suddenly start completely failing.
  • New builds with Bikeshed require updating the WebIDL.

Working around those issues creates yet another level of problems:

  • Avoiding to update the idlharness parser to avoid breaking previous tests incentives editors to keep to the old syntax.
  • Parsers may decide to keep supporting older syntax, thus creating situations where certain syntax is supported by Bikeshed, but not by ReSpec, or by ReSpec but not by idlharness, which is really confusing for editors.

Proposed solution

Don't remove grammar right away. Instead, mark grammar as deprecated for a given period of time (6 months?). Have all the tools (parsers, idlharness, ReSpec, Bikeshed) implement the same version of the grammar (with the same deprecation warnings) and sync dropping off support.

Add information in the spec as to when and what tools may/should emit as warning for deprecated syntax.

Immediate targets

  • I think serializer has been mostly fixed, so it's probably not worth adding it back to the spec and marking it as deprecated (also because it seems like a lot of work). @gsnedders, @foolip: can you confirm?
  • implements is a great candidate, however.

Would love to hear @plinss's, @marcoscaceres's, @tabatkins's, @bzbarsky's, @annevk's and @domenic's thoughts on the topic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions