Skip to content

Commit 8847bb4

Browse files
committed
package deps
1 parent 5cdd221 commit 8847bb4

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

Package.swift

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,40 @@ let featureSettings: [SwiftSetting] = [
4242
.enableUpcomingFeature("MemberImportVisibility")
4343
]
4444

45-
var dependencies: [Package.Dependency] {
46-
if Context.environment["SWIFTCI_USE_LOCAL_DEPS"] != nil {
45+
var dependencies: [Package.Dependency] = []
46+
47+
if let useLocalDepsEnv = Context.environment["SWIFTCI_USE_LOCAL_DEPS"], !useLocalDepsEnv.isEmpty {
48+
let root: String
49+
if useLocalDepsEnv == "1" {
50+
root = ".."
51+
} else {
52+
root = useLocalDepsEnv
53+
}
54+
dependencies +=
4755
[
4856
.package(
4957
name: "swift-collections",
50-
path: "../swift-collections"),
58+
path: "\(root)/swift-collections"),
5159
.package(
5260
name: "swift-foundation-icu",
53-
path: "../swift-foundation-icu"),
61+
path: "\(root)/swift-foundation-icu"),
5462
.package(
5563
name: "swift-syntax",
56-
path: "../swift-syntax")
64+
path: "\(root)/swift-syntax")
5765
]
58-
} else {
66+
} else {
67+
dependencies +=
5968
[
6069
.package(
6170
url: "https://github.com/apple/swift-collections",
62-
from: "1.1.0"),
71+
branch: "main"),
6372
.package(
6473
url: "https://github.com/apple/swift-foundation-icu",
6574
branch: "main"),
6675
.package(
6776
url: "https://github.com/swiftlang/swift-syntax",
6877
branch: "main")
6978
]
70-
}
7179
}
7280

7381
let wasiLibcCSettings: [CSetting] = [

0 commit comments

Comments
 (0)