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

build: partially repair cross-repository testing #1826

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
12 changes: 9 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ if buildOnlyTests {
if case .byNameItem(name: "SKTestSupport", _) = dependency {
return true
}
if case .productItem(name: "IndexStoreDB", _, _, _) = dependency {
return true
}
return false
}
return target
Expand Down Expand Up @@ -509,8 +512,13 @@ var buildOnlyTests: Bool { hasEnvironmentVariable("SOURCEKIT_LSP_BUILD_ONLY_TEST
// for building the swift toolchain, such as `update-checkout`, or cross-repo PR tests.

var dependencies: [Package.Dependency] {
let relatedDependenciesBranch = "main"

if buildOnlyTests {
return []
return useLocalDependencies
? [ .package(path: "../indexstore-db") ]
: [ .package(url: "https://github.com/swiftlang/indexstore-db.git",
branch: relatedDependenciesBranch) ]
} else if useLocalDependencies {
return [
.package(path: "../indexstore-db"),
Expand All @@ -521,8 +529,6 @@ var dependencies: [Package.Dependency] {
.package(path: "../swift-crypto"),
]
} else {
let relatedDependenciesBranch = "main"

return [
.package(url: "https://github.com/swiftlang/indexstore-db.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/swiftlang/swift-package-manager.git", branch: relatedDependenciesBranch),
Expand Down