maps: fix the ambiguous cargo run in the transit pack build
- Commit
5797fc054b038da92898936ad38938f6815d7cce- Author
- vayun-mathur <[email protected]>
- When
- 2026-08-21 04:36 UTC (3 months ago)
- Parents
eddb650
Adding the transit_stops binary in 33dbd088d made the gtfs_ingest crate multi-binary, which broke build_ca_transit.ps1: its bare cargo run could no longer choose and exited 101. Names --bin explicitly at that call site and sets default-run so any other bare invocation keeps working. build_world_transit.sh was unaffected -- it builds then invokes the binary path directly. Found by running the real California build, which now completes: 27 feeds, 58566 stops, format_version 5, with FEED_MOTIS_PREFIX 108 bytes (27 feeds) and STOP_GTFS_ID 234264 bytes (58566 stops).
Diff
scripts/maps/build_ca_transit.ps1
diff --git a/scripts/maps/build_ca_transit.ps1 b/scripts/maps/build_ca_transit.ps1index 06498197e2..c5c86a01e3 100644--- a/scripts/maps/build_ca_transit.ps1+++ b/scripts/maps/build_ca_transit.ps1@@ -264,7 +264,9 @@ Write-Host " wrote $($lines.Count) feeds to $manifest" Write-Host "[5/5] Merging into $PackName.transit" $ingestManifest = Join-Path $PSScriptRoot "gtfs_ingest\Cargo.toml"-cargo run --release --quiet --manifest-path $ingestManifest -- $Out $PackName --manifest $manifest+# --bin is required: the crate also carries `transit_stops` (the basemap stop+# layer), so a bare `cargo run` cannot choose.+cargo run --release --quiet --manifest-path $ingestManifest --bin gtfs_ingest -- $Out $PackName --manifest $manifest if ($LASTEXITCODE -ne 0) { throw "gtfs_ingest failed with exit code $LASTEXITCODE" } $packPath = Join-Path $Out "$PackName.transit"
scripts/maps/gtfs_ingest/Cargo.toml
diff --git a/scripts/maps/gtfs_ingest/Cargo.toml b/scripts/maps/gtfs_ingest/Cargo.tomlindex ae4222d78d..269af95971 100644--- a/scripts/maps/gtfs_ingest/Cargo.toml+++ b/scripts/maps/gtfs_ingest/Cargo.toml@@ -13,6 +13,9 @@ edition = "2021" publish = false license = "GPL-2.0-only" description = "GTFS -> compact on-device transit index for the Maps offline packs"+# The crate carries two binaries, so a bare `cargo run` would be ambiguous. Name+# the pack builder as the default so existing callers keep working.+default-run = "gtfs_ingest" [[bin]] name = "gtfs_ingest"