Skip to content

SwiftSyntax version in new macro template has trailing period in dependency version, causing error reading manifest #7018

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/PackageModel/InstalledSwiftPMConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public struct InstalledSwiftPMConfiguration: Codable {
}

public var description: String {
return "\(major).\(minor).\(patch).\(prereleaseIdentifier.map { "-\($0)" } ?? "")"
return "\(major).\(minor).\(patch)\(prereleaseIdentifier.map { "-\($0)" } ?? "")"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift open source project
//
// Copyright (c) 2014-2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

import XCTest

@testable import PackageModel

final class InstalledSwiftPMConfigurationTests: XCTestCase {
func testVersionDescription() {
do {
let version = InstalledSwiftPMConfiguration.Version(major: 509, minor: 0, patch: 0)
XCTAssertEqual(version.description, "509.0.0")
}
do {
let version = InstalledSwiftPMConfiguration.Version(major: 509, minor: 0, patch: 0, prereleaseIdentifier: "alpha1")
XCTAssertEqual(version.description, "509.0.0-alpha1")
}
do {
let version = InstalledSwiftPMConfiguration.Version(major: 509, minor: 0, patch: 0, prereleaseIdentifier: "beta.1")
XCTAssertEqual(version.description, "509.0.0-beta.1")
}
}
}