Skip to content

[Collections] Support 'v' prefix in version #3495

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

Merged
merged 1 commit into from
May 14, 2021
Merged

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented May 13, 2021

Motivation:
Package versions with 'v' prefix (e.g., v1.0.0) in a collection are dropped because they are not semver, but SwiftPM actually supports checking out git tags that have 'v' prefix.

Modifications:

  • Move TSCUtility.Verson.init(tag:) to Basics for sharing
  • Use Version(tag:), which strips away any 'v' prefix, instead of Version(string:)

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

@swift-ci please smoke test

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

@swift-ci please smoke test

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

Hmm test failure doesn't seem to be related to this PR but got the same failure twice already:

21:29:49 Test Case 'BuildToolTests.testBuildCompleteMessage' started at 2021-05-13 04:29:06.495
21:29:49 
/home/buildnode/jenkins/workspace/swift-package-manager-self-hosted-Linux-smoke-test/branch-main/swiftpm/Tests/CommandsTests/BuildToolTests.swift:256: error: BuildToolTests.testBuildCompleteMessage : XCTAssertTrue failed - [1/4] Compiling Bar Bar.swift
21:29:49 [3/6] Merging module Bar
21:29:49 [5/7] Wrapping AST for Bar for debugging
21:29:49 [6/9] Compiling Foo Foo.swift
21:29:49 [7/9] Compiling Foo main.swift
21:29:49 [9/11] Merging module Foo
21:29:49 [11/12] Wrapping AST for Foo for debugging
21:29:49 [12/12] Linking Foo
21:29:49 [12/12] Build complete!
21:29:49 
21:29:49 Test Case 'BuildToolTests.testBuildCompleteMessage' failed (5.24 seconds)

@swift-ci please smoke test Linux

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

CI failure reproducible with swiftlang/swift:nightly-focal. The assertion in BuildToolTests.testBuildCompleteMessage expects [8/8] Build complete! but looks like it's become [12/12] Build complete!.

Updating test: #3496

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

@swift-ci please smoke test self hosted Linux

@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

@swift-ci please smoke test self hosted

Motivation:
Package versions with 'v' prefix (e.g., `v1.0.0`) in a collection are dropped because they are not semver, but SwiftPM actually supports checking out git tags that have 'v' prefix.

Modifications:
- Move `TSCUtility.Verson.init(tag:)` to `Basics` for sharing
- Use `Version(tag:)`, which strips away any 'v' prefix, instead of `Version(string:)`
@yim-lee
Copy link
Contributor Author

yim-lee commented May 13, 2021

@swift-ci please smoke test

@yim-lee yim-lee merged commit 6fb5138 into swiftlang:main May 14, 2021
@yim-lee yim-lee deleted the v-prefix branch May 14, 2021 02:24
bitjammer pushed a commit to bitjammer/swift-package-manager that referenced this pull request Jul 23, 2021
Motivation:
Package versions with 'v' prefix (e.g., `v1.0.0`) in a collection are dropped because they are not semver, but SwiftPM actually supports checking out git tags that have 'v' prefix.

Modifications:
- Move `TSCUtility.Verson.init(tag:)` to `Basics` for sharing
- Use `Version(tag:)`, which strips away any 'v' prefix, instead of `Version(string:)`
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 this pull request may close these issues.

3 participants