Skip to content

fix #18: Clean up package layout — eliminate SwiftPM unhandled-file warnings#67

Closed
ShadyUnderLight wants to merge 2 commits intomainfrom
fix/issue52-provider-nil
Closed

fix #18: Clean up package layout — eliminate SwiftPM unhandled-file warnings#67
ShadyUnderLight wants to merge 2 commits intomainfrom
fix/issue52-provider-nil

Conversation

@ShadyUnderLight
Copy link
Copy Markdown
Owner

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

  • Add exclude: ["Version.swift.in"] to TrackSplitterLib: the .swift.in template 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

  • Remove Bundle.module.url(forResource:) lookup from locateScript(): Bundle.module is only synthesized by SwiftPM when a resources: 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

  • Reduce or eliminate SwiftPM "unhandled file(s)" warnings during build.
  • Make the package layout unambiguous (template in Library/, generated file used at compile time, resources properly declared).
  • Package.swift explicitly models resources/exclusions.
  • Document the intended repo structure in README.md — tracked in issue [P2] Clean up package layout and remove SwiftPM unhandled-file warnings #18 follow-up.

Closes #18.

mn added 2 commits April 20, 2026 17:36
- 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.
@ShadyUnderLight ShadyUnderLight force-pushed the fix/issue52-provider-nil branch from e3a5297 to 39c2ec1 Compare April 21, 2026 03:24
@ShadyUnderLight
Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P2] Clean up package layout and remove SwiftPM unhandled-file warnings

2 participants