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

[SR-15065] SPM package-collection-generate fails on binary targets #4394

Open
swift-ci opened this issue Aug 13, 2021 · 2 comments
Open

[SR-15065] SPM package-collection-generate fails on binary targets #4394

swift-ci opened this issue Aug 13, 2021 · 2 comments
Labels

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-15065
Radar rdar://problem/82263304
Original Reporter coolme2 (JIRA User)
Type Bug
Environment

macOS 11.4

Xcode 13 beta 5

SwiftPM tools 5.5 (from Xcode distribution)

package-collection-generate compiled from HEAD

Additional Detail from JIRA
Votes 2
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 38f5f53590e0c8ec5a77ec68cc1be7e9

Issue Description:

package-collection-generate throws the following error:

$ xcrun package-collection-generate -v ~/bin/swift-cots-packages.json cots-collection.json

error: InternalError(description: "Internal error. Please file a bug at https://bugs.swift.org with this info. unknown binary artifact for \'TMXProfiling\'")

By using verbose logging, narrowed it down to the following emitting the same error, which is called during generation:

$ swift package describe   
error: InternalError(description: "Internal error. Please file a bug at https://bugs.swift.org with this info. unknown binary artifact for \'TMXProfiling\'")

Running the same command using Swift 5.3/Xcode 12.3, the command succeeds with the following:

$ swift package describe
Name: TrustDefender
Path: /Users/coolme2/workspace/src/td/com.threatmetrix.trustdefendermobile
Modules:
    Name: TMXProfilingConnections
    C99name: TMXProfilingConnections
    Type: binary
    Module type: BinaryTarget
    Path: /Users/coolme2/workspace/src/td/com.threatmetrix.trustdefendermobile/build/TMXProfilingConnections.xcframework
    Sources: 

    Name: TMXProfiling
    C99name: TMXProfiling
    Type: binary
    Module type: BinaryTarget
    Path: /Users/coolme2/workspace/src/td/com.threatmetrix.trustdefendermobile/build/TMXProfiling.xcframework
    Sources: 

Also verified that the target name in Package.swift for the binary target (TMXProfiling) matches that of the modulemap per the xcframework documentation.

@typesanitizer
Copy link

@swift-ci create

@swift-ci
Copy link
Contributor Author

swift-ci commented Jan 9, 2022

Comment by Ben Chatelain (JIRA)

A fix for the above issue with the describe command has been merged:

#3810

Hopefully, that will be included in the next Xcode swift toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants