Page MenuHomePhabricator

Load map file in non-strict mode
Closed, ResolvedPublic


We shouldn't be loading the map file in strict mode, because this causes errors with fonts. The cause is the same as and the fix is

We should be calling Map.fromString somewhere from within the bowels of our code, and need to pass strict : false as part of the options.

Searching through node_modules, this is called by one of mapnik-pool, tilelive-vector, or tilelive-bridge

Event Timeline

Pnorman created this task.May 24 2018, 5:52 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 24 2018, 5:53 PM
Pnorman updated the task description. (Show Details)May 25 2018, 10:27 PM

I'm going to trim down the brighmed font list to match what we have. We should still be in non-strict mode, but this is a quicker way to get to working.

mojodna added a subscriber: mojodna.Jun 1 2018, 1:04 AM

Strict mode is on by default in tilelive-vector as of 0.4.0. Rather than being configurable as a query parameter, it's intended to be toggled module-wide as a mutable export:

To force it via tilelive-modules:

diff --git i/loader.js w/loader.js
index 2920730..013bb1f 100644
--- i/loader.js
+++ w/loader.js
@@ -19,6 +19,9 @@ module.exports = function(tilelive, options) {
     try {
+      if (name === "tilelive-vector") {
+        mod.strict = false;
+      }
       if (typeof(mod.registerProtocols) === "function") {
       } else {
Vvjjkkii renamed this task from Load map file in non-strict mode to eccaaaaaaa.Jul 1 2018, 1:08 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from eccaaaaaaa to Load map file in non-strict mode.Jul 2 2018, 3:50 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
Pnorman triaged this task as Normal priority.Jul 3 2018, 4:14 PM
Mholloway moved this task from Backlog to To-do on the Maps-Sprint board.Jul 3 2018, 4:56 PM
Mholloway moved this task from To-do to Needs review on the Maps-Sprint board.Sep 24 2018, 8:13 AM
Mholloway closed this task as Resolved.Sep 27 2018, 7:36 AM
Mholloway reopened this task as Open.

I suppose I should keep this open until we can deploy to prod.

Mentioned in SAL (#wikimedia-releng) [2018-09-27T07:38:16Z] <mdholloway> deployment-maps04 updated tilerator and kartotherian node modules (T195513, T200594)

MSantos closed this task as Resolved.Apr 12 2019, 4:34 PM