fix #18: Clean up package layout — eliminate SwiftPM unhandled-file warnings#67
Closed
ShadyUnderLight wants to merge 2 commits intomainfrom
Closed
fix #18: Clean up package layout — eliminate SwiftPM unhandled-file warnings#67ShadyUnderLight wants to merge 2 commits intomainfrom
ShadyUnderLight wants to merge 2 commits intomainfrom
Conversation
- Exclude Version.swift.in from TrackSplitterLib compilation (template, never compiled directly; generated Version.swift is used instead). - Remove Bundle.module lookup in MetadataEmbedder.locateScript(): Bundle.module requires a resources: declaration which is only valid for .libraryTarget(), not .target(). Runtime script location is already covered by the fallback search paths relative to the executable. This removes the only compilation dependency on the now-declared resources entry for embed_metadata.py.
…nate SwiftPM warning
e3a5297 to
39c2ec1
Compare
Owner
Author
|
Superseded by PR #70. The exclude: ["Version.swift.in"] fix that actually eliminates the SwiftPM warning has been split into a standalone PR, keeping this one's MetadataEmbedder.locateScript() change (Bundle.module removal) available separately if still desired. |
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
Fixes SwiftPM 'unhandled file(s)' warnings and removes a compilation-time dependency on Bundle.module that is not reliably available for .target() targets.
Changes
Package.swift
exclude: ["Version.swift.in"]to TrackSplitterLib: the.swift.intemplate is a build-time source only and must not be compiled; it is excluded so SwiftPM stops flagging it as an unhandled file.Library/MetadataEmbedder.swift
Bundle.module.url(forResource:)lookup fromlocateScript():Bundle.moduleis only synthesized by SwiftPM when aresources:declaration is present AND the target is compiled as a module bundle. Removing this dead branch eliminates the compile error that would occur if resources were ever removed from Package.swift. Script discovery at runtime is already covered by the fallback search paths (relative to executable location, covering standard install layouts).Acceptance Criteria Progress
Package.swiftexplicitly models resources/exclusions.README.md— tracked in issue [P2] Clean up package layout and remove SwiftPM unhandled-file warnings #18 follow-up.Closes #18.