Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

[WIP] Adapt to upcoming tilelive-bridge #1504

Merged
merged 5 commits into from
Nov 11, 2015
Merged

[WIP] Adapt to upcoming tilelive-bridge #1504

merged 5 commits into from
Nov 11, 2015

Conversation

springmeyer
Copy link
Contributor

Past tilelive-bridge did not validate mapnik XML when the source was created. Therefore you could have a seemingly valid source with a completely invalid XML loaded. This means that the error would only show up at source.getTile. This also meant that a test in studio classic was lurking that was not loading a valid source because the shapefiles were left behind. This pull fixes that problem.

refs mapbox/tilelive-bridge#66

/cc @yhahn @GretaCB @rclark

@springmeyer
Copy link
Contributor Author

Before this fix, with latest tilelive-bridge, the test would fail with:

TAP version 13
# local: save as tmp => perm
ok 1 null
not ok 2 Error: Shape Plugin: shapefile '/var/folders/jv/bhkldrpj41jbkpzxgc9ggr_r0000gn/T/mapbox-studio/source-saveas-vbozockyxbhuxr/10m-900913-bounding-box.shp' does not exist encountered during parsing of layer 'solid' in Layer
  ---
    operator: error
    expected: |-
      undefined
    actual: |-
      [Error: Shape Plugin: shapefile '/var/folders/jv/bhkldrpj41jbkpzxgc9ggr_r0000gn/T/mapbox-studio/source-saveas-vbozockyxbhuxr/10m-900913-bounding-box.shp' does not exist  encountered during parsing of layer 'solid' in Layer]
    at: done (/Users/dane/projects/mbstudio/lib/source.js:223:25)
    stack: |-
      Error: Shape Plugin: shapefile '/var/folders/jv/bhkldrpj41jbkpzxgc9ggr_r0000gn/T/mapbox-studio/source-saveas-vbozockyxbhuxr/10m-900913-bounding-box.shp' does not exist  encountered during parsing of layer 'solid' in Layer
  ...

@springmeyer springmeyer added this to the v0.3.4 milestone Nov 11, 2015
@springmeyer springmeyer mentioned this pull request Nov 11, 2015
6 tasks
@springmeyer
Copy link
Contributor Author

Travis is green, so merging. Appveyor is failing but unrelated to this pull as far as I can tell:

not ok 294 Error: Active task in progress
  ---
    operator: error
    expected: |-
      undefined
    actual: |-
      [Error: Active task in progress]
    stack: |-
      Error: Active task in progress
          at startUpload (C:\projects\mapbox-studio-classic\lib\source.js:704:41)
          at C:\projects\mapbox-studio-classic\lib\source.js:680:17
          at C:\projects\mapbox-studio-classic\lib\source.js:528:30
          at load (C:\projects\mapbox-studio-classic\lib\source.js:437:16)
          at C:\projects\mapbox-studio-classic\lib\source.js:493:20
          at fs.js:334:14
          at C:\projects\mapbox-studio-classic\node_modules\fstream\node_modules\graceful-fs\graceful-fs.js:42:10
          at FSReqWrap.oncomplete (fs.js:95:15)
  ...
C:\projects\mapbox-studio-classic\test\source.test.js:529
        t.strictEqual(task.id, id, 'sets task.id');
                          ^
TypeError: Cannot read property 'id' of undefined
    at C:\projects\mapbox-studio-classic\test\source.test.js:529:27
    at startUpload (C:\projects\mapbox-studio-classic\lib\source.js:704:32)
    at C:\projects\mapbox-studio-classic\lib\source.js:680:17
    at C:\projects\mapbox-studio-classic\lib\source.js:528:30
    at load (C:\projects\mapbox-studio-classic\lib\source.js:437:16)
    at C:\projects\mapbox-studio-classic\lib\source.js:493:20
    at fs.js:334:14
    at C:\projects\mapbox-studio-classic\node_modules\fstream\node_modules\graceful-fs\graceful-fs.js:42:10
    at FSReqWrap.oncomplete (fs.js:95:15)
npm ERR! Test failed.  See above for more details.
error during "npm test" 

springmeyer pushed a commit that referenced this pull request Nov 11, 2015
[WIP] Adapt to upcoming tilelive-bridge
@springmeyer springmeyer merged commit ceedcd5 into mb-pages Nov 11, 2015
@springmeyer springmeyer deleted the tl-bridge-up branch November 11, 2015 19:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant