mdittmer / mdn-confluence

2 stars 5 forks source link

Revamp the core approach to converting Confluence to BCD #47

Closed foolip closed 4 years ago

foolip commented 4 years ago

There were a number of issues here:

This was addressed by:

Also, confluenceRowToCompatJsonFragment was reduced to a single scan through the row, which necessitated changing how the support object is updated. Important changes:

The many repeated calls to getMdnBrowserRelease could be hoisted out to be less wasteful, but speed is not of the essence here.

Drive-by: replace use of foam.String.isInstance

foolip commented 4 years ago

I'm submitting this as a pull request for visibility. @vinyldarkscratch, this is in order to fix a bunch of bugs I found so that I could extract all the juice possible before https://github.com/mdn/browser-compat-data/pull/6435.

However, it ended up being an exercise in how to map a series of test results to BCD entries, and there may be something to learn/reuse here. In particular, a bit of an unsolved problem is how to deal with transient additions or removals, where they're reverted a release or two later. This results in a bunch of noise, but worse, if only the addition is trusted then the result will be wrong.

foolip commented 4 years ago

Self-reviewing and merging this. More bugs will likely be found while testing the sum of recent changes before release.