-
Notifications
You must be signed in to change notification settings - Fork 194
Description
Question Checklist
- I'm using the latest version of Swift Crypto (main branch)
- I read the Contribution Guidelines
- I searched for existing GitHub issues
Question Subject
How to make the Package.swift of this project work with swift package resolve --use-registry-identity-for-scm
if I am using swift package registry where is the swift-asn1 package hosted.
I have everything set up correctly, but I am still getting error:
error: 'apple.swift-crypto': product 'SwiftASN1' required by package 'apple.swift-crypto' target '_CryptoExtras' not found in package 'swift-asn1'. Did you mean '.product(name: "SwiftASN1", package: "apple.swift-asn1")'?
It seems to me the line below from Package.swift, does not work properly with this command swift package resolve --use-registry-identity-for-scm
:
.product(name: "SwiftASN1", package: "swift-asn1")
in Package.swift .
I already filled a bug issue in spm: swiftlang/swift-package-manager#8116 , but I still hope I can somehow find a way how to make it work..
What I tried:
1. Attempt
I would guess the .product(name: "SwiftASN1", package: "swift-asn1")
should be .product(name: "SwiftASN1", package: "apple.swift-asn1")
, but then the spm returns error:
error: 'swift-crypto': unknown package 'apple.swift-asn1' in dependencies of target '_CryptoExtras'; valid packages are: 'swift-asn1' (from 'https://github.com/apple/swift-asn1.git')
I would guess the spm should resolve it but it does not...
2. Attempt
Changing the url to id: .package(id: "https://github.com/apple/swift-asn1.git", from: "1.2.0")
Based on the swift package registry readme
I got: error: 'error: 'swift-crypto': invalid manifest (evaluation failed) Invalid package identifier: 'https://github.com/apple/swift-asn1.git'
So this does not seem to work as expected as well.
Question Description
The package has id apple.swift-asn1 based on the syntax scope.name. I have also the package metadata such as remoteUrls: [git@github.com:apple/swift-asn1.git, https://github.com/apple/swift-asn1.git].
The swift-package-registry is hosted on artifactory.
Tools versions:
swift-driver version: 1.115 Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
Target: arm64-apple-macosx14.0
Darwin M-FVFFG20KQ05P 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:49:46 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T8103 arm64