vtshaver icon indicating copy to clipboard operation
vtshaver copied to clipboard

Auto upgrade legacy filters

Open springmeyer opened this issue 6 years ago • 3 comments

This leverages functionality inside the mapbox-gl-style-spec to auto-upgrade legacy filter syntax.

This avoids errors in styles which mix the legacy syntax with the modern syntax.

Will fail until the style-spec version is upgraded, which can happen after https://github.com/mapbox/mapbox-gl-js/pull/8493 is in a release.

springmeyer avatar Jul 16 '19 23:07 springmeyer

This is passing on travis except for the coverage build, which I'm working on fixing over at #29

/cc @ian29 @mapsam

springmeyer avatar Jul 18 '19 19:07 springmeyer

This PR is now rebased against latest master and includes the latest mapbox-gl-style-spec release, which means its ready for further review and testing /cc @ian29 @ericfischer @mapsam

springmeyer avatar Jul 31 '19 21:07 springmeyer

This PR came up today in conversation with @briandaviddavidson. The main holdup on moving this forward is that we need to build confidence around styleSpec.convertFilter. I don't yet know the answers to these questions:

  • Is styleSpec.convertFilter robust (won't throw odd errors or corrupt output) against all possible styles in the wild?
  • Have there been any recent releases of @mapbox/mapbox-gl-style-spec that we should upgrade to before further testing this?
  • Do we need more unit test coverage in this PR of possible things that can go wrong with running styleSpec.convertFilter against arbitrary input?

Getting the answers to these questions would involve:

  • Building up a large set of sample styles to try running this against
  • Careful canary to further see if any styles in the wild trigger new types of errors
  • Building back any problem test styles into test fixtures
  • Handling any newly discovered errors correctly in the code

springmeyer avatar Feb 06 '20 18:02 springmeyer