Skip to content

Conversation

@RobertSasak
Copy link

Fix #2169

@CommanderStorm
Copy link
Member

could you add a minimal example (either a new one or modifying one of the existing) and add it as a testcase under /tests?

According to my understanding this should not be possible => very valuable to have a testcase for this.

@RobertSasak
Copy link
Author

RobertSasak commented Oct 20, 2025

I am struggling to get the development working on macOS.

martin git:(main) just start
docker-compose up -d fileserver
[+] Running 1/1
 ✔ Container martin-fileserver-1  Running                                                                        0.0s 
docker-compose up -d db
[+] Running 1/1
 ✘ db Error no matching manifest for linux/arm64/v8 in the manifest list entries: no match for plat...           2.0s 
Error response from daemon: no matching manifest for linux/arm64/v8 in the manifest list entries: no match for platform in manifest: not found
error: Recipe `docker-up` failed on line 466 with exit code 1

Related issues:

I am able to use martin on macOS but I am not able to start development server.

@CommanderStorm
Copy link
Member

For what you are trying to test, neither postgis nor nginx should be nessesary.

Postgis does not currently publish arm images, but there is movement:

I would recommend you to write a test and just execute that one for the time beeing:

cargo test -- testname

@RobertSasak
Copy link
Author

I can run test on main branch. But once I apply my fix of query the test does not run any more.

martin git:(patch-1) cargo test -- detect_type
   Compiling mbtiles v0.13.1 (/Users/robertsasak/Documents/GitHub/martin/mbtiles)
error: `SQLX_OFFLINE=true` but there is no cached data for this query, run `cargo sqlx prepare` to update the query cache or unset `SQLX_OFFLINE`
  --> mbtiles/src/queries.rs:26:15
   |
26 |       let sql = query!(
   |  _______________^
27 | |         "SELECT (
28 | |              -- Has a 'map' table
29 | |              SELECT COUNT(*) = 1
...  |
61 | |          ) AS is_valid;"
62 | |     );
   | |_____^
   |
   = 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)

error: `SQLX_OFFLINE=true` but there is no cached data for this query, run `cargo sqlx prepare` to update the query cache or unset `SQLX_OFFLINE`
  --> mbtiles/src/queries.rs:72:15
   |
72 |       let sql = query!(
   |  _______________^
73 | |         "SELECT (
74 | |            -- 'tiles_with_hash' table or view columns and their types are as expected:
75 | |            -- 5 columns (zoom_level, tile_column, tile_row, tile_data, tile_hash).
...  |
85 | |        ) as is_valid;"
86 | |     );
   | |_____^
   |
   = 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)

error: `SQLX_OFFLINE=true` but there is no cached data for this query, run `cargo sqlx prepare` to update the query cache or unset `SQLX_OFFLINE`
   --> mbtiles/src/queries.rs:115:15
    |
115 |       let sql = query!(
    |  _______________^
116 | |         "SELECT (
117 | |              -- Has a 'tiles' table
118 | |              SELECT COUNT(*) = 1
...   |
134 | |          ) as is_valid;"
135 | |     );
    | |_____^
    |
    = 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)

error: could not compile `mbtiles` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `mbtiles` (lib test) due to 3 previous errors

It seems like fixtures are not cached for my queries. I tried to generate them by running just prepare-sqlite which except mbtiles world_cities.mbtiles to exists.

So I tried to run just test-int to initialize test and I believe to create world_cities.mbtiles but it fails as it only support linux.

Is there anybody how is contributing from macos?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validating INT vs INTEGER

2 participants