Skip to content

Commit

Permalink
Fix missing Dependency (#61)
Browse files Browse the repository at this point in the history
* add dependency

* fix warnings

* add changelog

* swiftformat

* update workflow

* update test device

* add another simulator for testing

* fix yml syntax

* remove additional device

* update changelog
  • Loading branch information
Patrick-Kladek authored Nov 19, 2024
1 parent 59853fd commit ba76be3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,39 @@ on:

jobs:
format-lint:
runs-on: macos-14
runs-on: macos-15

steps:
- name: Install tools
run: brew install swiftformat

- name: Checkout maplibre-swiftui-dsl-playground
uses: actions/checkout@v4

- name: Check format
run: swiftformat . --lint

test:
runs-on: macos-14
runs-on: macos-15
strategy:
matrix:
scheme: [
MapLibreSwiftUI-Package
]
destination: [
# TODO: Add more destinations
'platform=iOS Simulator,name=iPhone 15,OS=17.5'
'platform=iOS Simulator,name=iPhone 16,OS=18.1'
]
name: ${{ matrix.destination }}

steps:
- name: Install tools
run: brew install xcbeautify
run: brew update && brew upgrade xcbeautify

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.4'
xcode-version: latest-stable

- name: Checkout maplibre-swiftui-dsl-playground
uses: actions/checkout@v4

- name: Test ${{ matrix.scheme }} on ${{ matrix.destination }}
run: xcodebuild -scheme ${{ matrix.scheme }} test -skipMacroValidation -destination '${{ matrix.destination }}' | xcbeautify && exit ${PIPESTATUS[0]}

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Version 0.4.1 - 2024-11-19

### Fixed

- Fixes failed builds when this packages is integrated in an App. InternalUtils package was missing a dependency to MapLibre

## Version 0.4.0 - 2024-11-19

### Changed
Expand Down
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ let package = Package(
),
.target(
name: "InternalUtils",
dependencies: [
.product(name: "MapLibre", package: "maplibre-gl-native-distribution"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import CoreLocation

// TODO: We can delete chat about this. I'm not 100% on it, even though I want Hashable
// on the MapCameraView (so we can let a user present a MapView with a designated camera from NavigationLink)
extension CLLocationCoordinate2D: Hashable {
extension CLLocationCoordinate2D: @retroactive Hashable {
public static func == (lhs: CLLocationCoordinate2D, rhs: CLLocationCoordinate2D) -> Bool {
lhs.latitude == rhs.latitude
&& lhs.longitude == rhs.longitude
Expand Down
4 changes: 2 additions & 2 deletions Sources/MapLibreSwiftUI/Models/MapCamera/CameraState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extension CameraState: CustomDebugStringConvertible {
}
}

extension MLNCoordinateBounds: Equatable, Hashable {
extension MLNCoordinateBounds: @retroactive Equatable, @retroactive Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(ne)
hasher.combine(sw)
Expand All @@ -76,7 +76,7 @@ extension MLNCoordinateBounds: Equatable, Hashable {
}
}

extension UIEdgeInsets: Hashable {
extension UIEdgeInsets: @retroactive Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(left)
hasher.combine(right)
Expand Down

0 comments on commit ba76be3

Please sign in to comment.