-
Notifications
You must be signed in to change notification settings - Fork 280
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
Allow workspace options to affect build system search #1889
base: main
Are you sure you want to change the base?
Conversation
@swift-ci please test |
6925afe
to
a26f35d
Compare
@swift-ci please test |
Tests/BuildSystemIntegrationTests/SwiftPMBuildSystemTests.swift
Outdated
Show resolved
Hide resolved
There were a few places that options only took place *after* determining a build system, even though we have multiple that impact the search (eg. `defaultBuildSystem` and `searchPaths`). Do not search up the directory tree when searching for a build system for a workspace. Only allow this for implicit workspaces (created when no existing workspace can handle a file) and only up to any existing workspace roots.
a26f35d
to
d9bba40
Compare
@swift-ci please test |
|
||
XCTAssertNotNil(tryLoadCompilationDatabase(directory: tempDir)) | ||
} | ||
} | ||
|
||
func testJSONCompilationDatabaseFromCustomDirectory() async throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a test for basically this in WorkspaceTests
now (since tryLoadCompilationDatabase
only loads from the directory itself). I'd be open to adding projectRoot
tests if you wanted though.
@swift-ci please test Windows platform |
There were a few places that options only took place after determining
a build system, even though we have multiple that impact the search (eg.
defaultBuildSystem
andsearchPaths
).Do not search up the directory tree when searching for a build system
for a workspace. Only allow this for implicit workspaces (created when
no existing workspace can handle a file) and only up to any existing
workspace roots.