Repository navigation
Update swift-log/swift-protobuf and support trait-disabled builds - #58
Merged
Merged
Conversation
Dependencies: - swift-log 1.14.0 -> 1.16.2 - swift-protobuf 1.38.1 -> 1.39.0 - gis-tools stays at 3.0.0-beta.1 because every gis-tools-* format package pins it exactly; documented in Package.swift. Trait-disabled builds (e.g. a plain `swift build`) previously failed because the CLI and CLI tests referenced coders that are gated behind package traits. Format load/write paths and format-specific tests are now guarded by #if Enable…; unbuilt formats are still recognized on the command line but fail with a clear runtime error. Also fix a few pre-existing compiler warnings in the tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
swift-logto 1.16.2 andswift-protobufto 1.39.0gis-toolsremains at 3.0.0-beta.1: everygis-tools-*format package pins it toexact: "3.0.0-beta.1", so bumping it alone fails resolution. This constraint is now documented inPackage.swift.Trait-disabled builds
swift build/swift testwithout--enable-all-traitspreviously failed because the CLI and CLI tests called coders that only exist with the corresponding trait enabled:Sources/MVTCLI/TileFormat.swift:loadTile(from:)cases for MLT/FIT/GPX/CSV/Shapefile/GeoPackage are now guarded by#if Enable…; otherwise they throw a newTileFormat.unavailableError("Format 'mlt' is not available in this build (enable the corresponding package trait)").Sources/MVTCLI/WriteTile.swift: same guards for the write path.Tests/MVTCLITests/*,TileDataContentConsistencyTests).--output-format) when the coder is not compiled in; they fail with the runtime error above instead of a compile error.Also removed a few pre-existing warnings (unnecessary
try, unusedcreateFileresults).Verification
No compiler warnings in any configuration.
--traits EnableMLT--traits EnableCSV,EnableGPX--enable-all-traits