Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use swift-markdown in package built for distribution #195

Closed
dfeinzimer opened this issue Aug 28, 2024 · 2 comments · Fixed by #200
Closed

Cannot use swift-markdown in package built for distribution #195

dfeinzimer opened this issue Aug 28, 2024 · 2 comments · Fixed by #200

Comments

@dfeinzimer
Copy link

dfeinzimer commented Aug 28, 2024

I've created an incredibly simple package with swift-markdown as the only dependency.

Archiving my package for distribution with the following command fails:

xcodebuild archive -scheme MyLibrary -destination generic/platform=iOS -archivePath /Users/[username]/Desktop/iOS.xcarchive BUILD_LIBRARY_FOR_DISTRIBUTION=YES

/Users/[username]/Library/Developer/Xcode/DerivedData/MyLibrary-guqxdcvdzivakeakwqoytmpxwgur/Build/Intermediates.noindex/ArchiveIntermediates/MyLibrary/IntermediateBuildFilesPath/swift-markdown.build/Release-iphoneos/Markdown.build/Objects-normal/arm64/Markdown.private.swiftinterface:4:8: error: no such module 'CAtomic'
import CAtomic
       ^
/Users/[username]/Library/Developer/Xcode/DerivedData/MyLibrary-guqxdcvdzivakeakwqoytmpxwgur/Build/Intermediates.noindex/ArchiveIntermediates/MyLibrary/IntermediateBuildFilesPath/swift-markdown.build/Release-iphoneos/Markdown.build/Objects-normal/arm64/Markdown.private.swiftinterface:1:1: error: failed to verify module interface of 'Markdown' due to the errors above; the textual interface may be broken by project issues or a compiler bug
// swift-interface-format-version: 1.0
^

** ARCHIVE FAILED **

Removing BUILD_LIBRARY_FOR_DISTRIBUTION=YES succeeds

** ARCHIVE SUCCEEDED **
  • swift-tools-version: 5.10

  • Xcode + CLI Tools Version 15.4 (15F31d)

  • Also reported as Apple Feedback FB14954614

  • Post on forums.swift.org

@dfeinzimer
Copy link
Author

dfeinzimer commented Aug 28, 2024

  • Also tested with swift-tools-version 6.0 and Xcode Version 16.0 beta 6 (16A5230g)
  • Also tried using @_implementationOnly import Markdown

@dfeinzimer
Copy link
Author

OTHER_SWIFT_FLAGS=-no-verify-emitted-module-interface seems to be the fix.

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 a pull request may close this issue.

1 participant