maplibre / martin

Blazing fast and lightweight PostGIS, MBtiles and PMtiles tile server, tile generation, and mbtiles tooling.
https://martin.maplibre.org
Apache License 2.0
2.29k stars 214 forks source link

[NixOS] mbtiles build error at query! macros #1482

Open pka opened 2 months ago

pka commented 2 months ago

A NixOS package build fails with:

   Compiling mbtiles v0.9.1
error: set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache
   --> /build/bbox-services-0.6.0-vendor.tar.gz/mbtiles/src/mbtiles.rs:135:21
    |
135 |         let query = query! {"SELECT tile_data from tiles where zoom_level = ? AND tile_column = ? AND tile_row = ?", z, x, y};
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `query` (in Nightly builds, run with -Z macro-backtrace for more info)

I can't reproduce it myself. Any ideas?

nyurik commented 2 months ago

hmm, need to look at it in depth. I am a bit overbooked at the moment (just got back from a vacation), will try to get to it soonish