Skip to content
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
6 changes: 3 additions & 3 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 17 additions & 44 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@
// swift-tools-version:5.2
// swift-tools-version:5.3
import PackageDescription

#if compiler(>=5.6)
let swiftSyntaxVersion: Package.Dependency.Requirement = .exact("0.50600.1-static")
#elseif compiler(>=5.5)
let swiftSyntaxVersion: Package.Dependency.Requirement = .exact("0.50500.0-static")
#elseif compiler(>=5.4)
let swiftSyntaxVersion: Package.Dependency.Requirement = .exact("0.50400.0")
#elseif compiler(>=5.3)
let swiftSyntaxVersion: Package.Dependency.Requirement = .exact("0.50300.0")
#else
fatalError("This version of Periphery does not support Swift <= 5.2.")
#endif

var dependencies: [Package.Dependency] = [
.package(url: "https://github.com/apple/swift-system", from: "1.0.0"),
.package(url: "https://github.com/jpsim/Yams", from: "4.0.0"),
.package(url: "https://github.com/tadija/AEXML", from: "4.0.0"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
.package(name: "SwiftIndexStore", url: "https://github.com/kateinoigakukun/swift-indexstore", from: "0.0.0")
.package(name: "SwiftIndexStore", url: "https://github.com/kateinoigakukun/swift-indexstore", from: "0.0.0"),
.package(name: "SwiftSyntax", url: "https://github.com/peripheryapp/swift-syntax", swiftSyntaxVersion)
]
#if swift(>=5.6)
dependencies.append(
.package(
name: "SwiftSyntax",
url: "https://github.com/apple/swift-syntax",
.exact("0.50600.1")
)
)
#elseif swift(>=5.5)
dependencies.append(
.package(
name: "SwiftSyntax",
url: "https://github.com/apple/swift-syntax",
.exact("0.50500.0")
)
)
#elseif swift(>=5.4)
dependencies.append(
.package(
name: "SwiftSyntax",
url: "https://github.com/apple/swift-syntax",
.exact("0.50400.0")
)
)
#elseif swift(>=5.3)
dependencies.append(
.package(
name: "SwiftSyntax",
url: "https://github.com/apple/swift-syntax",
.exact("0.50300.0")
)
)
#else
fatalError("This version of Periphery does not support Swift <= 5.2.")
#endif

#if os(macOS)
dependencies.append(
Expand Down Expand Up @@ -72,13 +50,8 @@ var peripheryKitDependencies: [PackageDescription.Target.Dependency] = [
.product(name: "SwiftIndexStore", package: "SwiftIndexStore")
]

#if swift(>=5.6)
peripheryKitDependencies.append(
.product(
name: "SwiftSyntaxParser",
package: "SwiftSyntax"
)
)
#if compiler(>=5.6)
peripheryKitDependencies.append(.product(name: "SwiftSyntaxParser", package: "SwiftSyntax"))
#endif

var targets: [PackageDescription.Target] = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import SystemPackage
import SwiftSyntax
#if swift(>=5.6)
#if canImport(SwiftSyntaxParser)
import SwiftSyntaxParser
#endif

Expand Down
2 changes: 1 addition & 1 deletion Sources/PeripheryKit/Syntax/UnusedParameterParser.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import SystemPackage
import SwiftSyntax
#if swift(>=5.6)
#if canImport(SwiftSyntaxParser)
import SwiftSyntaxParser
#endif

Expand Down
2 changes: 1 addition & 1 deletion Tests/PeripheryTests/Syntax/TypeSyntaxInspectorTest.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import XCTest
import SwiftSyntax
#if swift(>=5.6)
#if canImport(SwiftSyntaxParser)
import SwiftSyntaxParser
#endif
@testable import TestShared
Expand Down