Skip to content

Commit

Permalink
Expose exit information on RouteSteps (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthetechie authored Dec 9, 2024
1 parent 1a59786 commit 990e688
Show file tree
Hide file tree
Showing 29 changed files with 8,365 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Ensure that Package.swift is NOT configured for local development at this stage (easy to forget)
run: sed -i '' 's/let useLocalFramework = true/let useLocalFramework = false/' Package.swift

- name: Commit changed files (it is easy to forget about ferrostar.swift)
- name: Detect changed files (it is easy to forget about ferrostar.swift)
run: |
if [[ -n "$(git status --porcelain apple/Sources/UniFFI/*)" ]]; then
echo "Dirty files detected"
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if useLocalFramework {
path: "./common/target/ios/libferrostar-rs.xcframework"
)
} else {
let releaseTag = "0.23.0"
let releaseTag = "0.24.0"
let releaseChecksum = "fa308b519db5424d73d00d60ca03fc18c1dcf2f88704aadce29259d12f2de2b2"
binaryTarget = .binaryTarget(
name: "FerrostarCoreRS",
Expand Down
2 changes: 1 addition & 1 deletion _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ extend-ignore-re = [
rememberable = "rememberable"

[files]
extend-exclude = ["**/build/*", "*.pbxproj", "**/dist/*", "guide/**/*.js"]
extend-exclude = ["**/build/*", "*.pbxproj", "**/dist/*", "guide/**/*.js", "**/fixtures/*"]
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ ext {

allprojects {
group = "com.stadiamaps.ferrostar"
version = "0.23.0"
version = "0.24.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class FerrostarCoreTest {
geometry = mockGeom,
distance = 1.0,
roadName = "foo road",
exits = listOf(),
instruction = "Sail straight",
visualInstructions =
listOf(
Expand Down
1 change: 1 addition & 0 deletions apple/Sources/FerrostarCore/Mock/MockNavigationState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public extension NavigationState {
distance: 100,
duration: 99,
roadName: "Jefferson St.",
exits: [],
instruction: "Walk west on Jefferson St.",
visualInstructions: [
VisualInstruction(
Expand Down
1 change: 1 addition & 0 deletions apple/Sources/FerrostarSwiftUI/TestFixtureFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ struct RouteStepFactory: TestFixtureFactory {
distance: 100,
duration: 99,
roadName: roadNameBuilder(n),
exits: [],
instruction: "Walk west on \(roadNameBuilder(n))",
visualInstructions: [visualInstructionBuilder(n)],
spokenInstructions: [],
Expand Down
14 changes: 14 additions & 0 deletions apple/Sources/UniFFI/ferrostar.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apple/Tests/FerrostarCoreTests/FerrostarCoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ let mockRoute = Route(
distance: 1,
duration: 0,
roadName: "foo road",
exits: [],
instruction: "Sail straight", // 🏴‍☠️⛵️
visualInstructions: [VisualInstruction(
primaryContent: instructionContent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- annotations: Optional<Array<String>>.none
- distance: 1.0
- duration: 0.0
- exits: 0 elements
▿ geometry: 2 elements
▿ GeographicCoordinate
- lat: 0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- annotations: Optional<Array<String>>.none
- distance: 1.0
- duration: 0.0
- exits: 0 elements
▿ geometry: 2 elements
▿ GeographicCoordinate
- lat: 0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- annotations: Optional<Array<String>>.none
- distance: 1.0
- duration: 0.0
- exits: 0 elements
▿ geometry: 2 elements
▿ GeographicCoordinate
- lat: 0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- annotations: Optional<Array<String>>.none
- distance: 284.0
- duration: 11.488
- exits: 0 elements
▿ geometry: 10 elements
▿ GeographicCoordinate
- lat: 60.534716
Expand Down Expand Up @@ -85,6 +86,7 @@
- annotations: Optional<Array<String>>.none
- distance: 0.0
- duration: 0.0
- exits: 0 elements
▿ geometry: 2 elements
▿ GeographicCoordinate
- lat: 60.534991
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- annotations: Optional<Array<String>>.none
- distance: 284.0
- duration: 11.488
- exits: 0 elements
▿ geometry: 10 elements
▿ GeographicCoordinate
- lat: 60.534716
Expand Down Expand Up @@ -85,6 +86,7 @@
- annotations: Optional<Array<String>>.none
- distance: 0.0
- duration: 0.0
- exits: 0 elements
▿ geometry: 2 elements
▿ GeographicCoordinate
- lat: 60.534991
Expand Down
2 changes: 1 addition & 1 deletion common/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/ferrostar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lints.workspace = true

[package]
name = "ferrostar"
version = "0.23.0"
version = "0.24.0"
readme = "README.md"
description = "The core of modern turn-by-turn navigation."
keywords = ["navigation", "routing", "valhalla", "osrm"]
Expand Down
2 changes: 2 additions & 0 deletions common/ferrostar/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ pub struct RouteStep {
pub duration: f64,
/// The name of the road being traveled on (useful for certain UI styles).
pub road_name: Option<String>,
/// A list of exits (name or number).
pub exits: Vec<String>,
/// A description of the maneuver (ex: "Turn wright onto main street").
///
/// Note for UI implementers: the context this appears in (or doesn't)
Expand Down
Loading

0 comments on commit 990e688

Please sign in to comment.