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-5693] SemVer variant incompatible with SwiftPM #4966

Open
BasThomas opened this issue Aug 15, 2017 · 8 comments
Open

[SR-5693] SemVer variant incompatible with SwiftPM #4966

BasThomas opened this issue Aug 15, 2017 · 8 comments
Labels

Comments

@BasThomas
Copy link

Previous ID SR-5693
Radar rdar://problem/40205279
Original Reporter @BasThomas
Type Bug
Environment

Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
Target: x86_64-apple-macosx10.9
/Library/Developer/CommandLineTools/usr/bin/lldb "--repl=-enable-objc-interop -sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -color-diagnostics"
Welcome to Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42).

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

md5: 8fa4044d8e9412f2d3bde2d32cebba5f

Issue Description:

Although a version like 9.0.0-alpha.1 is compatible with SemVer, it is not supported in SwiftPM, which errors with "unsatisfiable". More information can be found in this issue over at Moya.

@aciidgh
Copy link
Contributor

aciidgh commented Aug 16, 2017

unsatisfiable means that the resolver was not able to find a valid solution. The dependency resolution around prerelease tags in Swift 3 toolchain is broken. Can you try the same thing with a swift 4 toolchain? You don't need to update the manifest, just the toolchain.

If that also fails, can you also post the exact manifest you're having problems with?

Thanks!

@BasThomas
Copy link
Author

If I can find the time I'd gladly test with the Swift 4 toolchain. In the meantime, it seems like the specific issue was actually a git bug, wherein the tag name and branch name are the same, causing the resolver to fail. I'd guess we can close the issue then.

If this is something that can be resolved via SwiftPM, that would be awesome. If not, improving the error messaging (again, if possible) would be another improvement.

Thanks for the update, Ankit!

@aciidgh
Copy link
Contributor

aciidgh commented May 14, 2018

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from swiftlang/swift May 4, 2022
@krzyzanowskim
Copy link
Contributor

It's been almost 5 years now since it's broken, I wonder whether SwiftPM documentation at https://www.swift.org/package-manager/ should still state that it follows SemVer, while it's not. wdyt?

@WowbaggersLiquidLunch
Copy link
Contributor

WowbaggersLiquidLunch commented Mar 16, 2023

The version string "9.0.0-alpha.1" in the original bug report should be parsed correctly since #3486 and swiftlang/swift-tools-support-core#214. There are still some bugs in the parsing logic that deviates form SemVer's (but I forgot what exactly). Last year I had planned to first fix DocC SymbolKit's SemVer implementation swiftlang/swift-docc-symbolkit#36, then carry the same change into DocC's, then adapt it to fix SwiftPM/TSC's. I just haven't gotten around to it yet. (Maybe I can pick it up this weekend or next week, but no promises)

@krzyzanowskim
Copy link
Contributor

thanks!

btw. I just tried "2.0-beta.1" and "2.0.0-beta.1" and it didn't work in Xcode SwiftPM

@WowbaggersLiquidLunch
Copy link
Contributor

Are you using the version string in an Xcode project or a Swift package? If it's the former, then I guess the bug might be because Xcode doesn't use SwiftPM/TSC's version parser, as discovered by @SDGGiesbrecht in #6143.

@tomerd
Copy link
Contributor

tomerd commented Mar 16, 2023

cc @abertelrud if this is an Xcode specific issue, lets track it as such.

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

5 participants