mapbox / mapbox/vector-tile-spec
Restore MUST requirement for version field first
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1k
- Forks
- 213
- PR merge metrics
- No merged PRs in 30d
Description
At one point the spec said "The version field MUST be the first field within the layer", and as a result of #43 we changed it to SHOULD. I think this was a mistake, and we should have left it MUST, and accepted the requirement that vector tiles be generated with tools that provide control over field order. Let's consider changing it back in a future revision.
Here's the real-world scenario where it matters: for offline features in Mapbox Mobile, the SDK downloads a large number of gzipped vector tiles for offline storage. Mapbox Mobile wants to not have to support V1 tiles at some point in the future. Therefore it needs to verify that all downloaded tiles (possibly tens of thousands of them) are V2 tiles. If the version field were guaranteed to be first, it could gunzip just the first few bytes of each tile and check the version. If the version field is not guaranteed to be first, it has to either disallow otherwise-valid V2 tiles where the version field is not first, or allow an unbounded portion of the tile to be gunzipped, potentially making offline downloads much more compute intensive then they would otherwise need to be. Neither are good failure modes.
cc @flippmoke @joto
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the version-field wording in the specification and the discussion in #43 first. Done would require a decision for a future revision, followed by updating the specification or documenting why SHOULD remains appropriate.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100