-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix binary targets which no longer resolve in SwiftPM. #18
Comments
Note if using powershell, which is a great cross-platform shell across macOS, Linux, and Windows:
pwsh
code $PROFILE
function StackotterPM {
$ArgRest = ($Args).Where({$_ -ne 'build' -and $_ -ne 'run' -and $_ -ne 'test' -and $_ -ne 'package'})
if(($Args[0] -eq 'build')) {
& /Users/$env:USER/Wabi/SwiftPM/.build/arm64-apple-macosx/release/swift-build $ArgRest
} elseif(($Args[0] -eq 'run')) {
& /Users/$env:USER/Wabi/SwiftPM/.build/arm64-apple-macosx/release/swift-run $ArgRest
} elseif(($Args[0] -eq 'test')) {
& /Users/$env:USER/Wabi/SwiftPM/.build/arm64-apple-macosx/release/swift-test $ArgRest
} elseif(($Args[0] -eq 'package')) {
& /Users/$env:USER/Wabi/SwiftPM/.build/arm64-apple-macosx/release/swift-package $ArgRest
} else {
Write-Color -Text "stackypm: available options are (", "build ", "run ", "test ", "or ", "package", ")" -Color Blue, Yellow, Yellow, Yellow, Blue, Yellow, Blue
}
}
# Run our fork of swiftpm.
Set-Alias stackypm StackotterPM
. $PROFILE now use it like the following: stackypm build
stackypm run
stackypm test
stackypm package |
Update: The test above, while a valid test to check if binary artifacts are working, I can only replicate this bug if the dependency graph is rather insane, like with MetaverseKit: git clone git@github.com:wabiverse/MetaverseKit.git
cd MetaverseKit
stackypm build -c release Should induce the following error message: Fetching https://github.com/pvieito/PythonKit.git from cache
Fetching https://github.com/wabiverse/MetaverseVulkanFramework from cache
// ...
Fetching binary artifact https://github.com/wabiverse/MetaverseBoostFramework/releases/download/1.81.4/boost.xcframework.zip from cache
Fetched https://github.com/wabiverse/MetaverseBoostFramework/releases/download/1.81.4/boost.xcframework.zip from cache (32.82s)
error: InternalError(description: "Internal error. Please file a bug at https://github.com/swiftlang/swift-package-manager/issues with this info. unknown module: <ResolvedModule: Python, binary>") |
This is an issue in the |
This is a bug that propagated after the addition of #17.
Figure out why binary target dependencies can no longer resolve.
Now build a testing SwiftPM package, using an alias for
stackypm
or some other alias to.build/arm64-apple-macosx/release/swift-build
to build a package which depends on a binary artifact, you can use this SwiftPMPackage.swift
manifest for testing:The text was updated successfully, but these errors were encountered: