go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.28k stars 195 forks source link

Pass tests on Apple silicon #951

Closed jchamberlain closed 9 months ago

jchamberlain commented 1 year ago

Tegola's tests don't pass on M1/M2 Macs for two reasons:

  1. Many calculated floats are slightly (insignificantly) different, but SQL string comparisons in the PostGIS and Hana providers expect an exact match.
  2. TestGenerateTilesForBounds fails because of a bug in go-spatial/geom (uint overflow, resulting in implementation-specific behavior—see https://github.com/golang/go/issues/52943). The geom code in question has since been rewritten and does not exhibit the same bug, so upgrading fixes it.

From my perspective, (2) is best fixed by upgrading go-spatial/geom. But that introduces its own trouble in that some float calculations are even more different (exacerbating 1), and backward-incompatible changes have been made.

jchamberlain commented 9 months ago

With the two PRs merged, tests are now passing on my M1 Mac. Thank you!