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

Allow workspace options to affect build system search #1889

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Dec 14, 2024

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.

@bnbarham bnbarham requested a review from ahoppen as a code owner December 14, 2024 01:03
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham bnbarham force-pushed the build-system-override branch from 6925afe to a26f35d Compare December 18, 2024 23:17
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham bnbarham force-pushed the build-system-override branch from a26f35d to d9bba40 Compare December 20, 2024 04:13
@bnbarham bnbarham changed the title Allow overriding the workspace buildsystem per workspace Allow workspace options to affect build system search Dec 20, 2024
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small comments, otherwise LGTM. Thanks!

Tests/SourceKitLSPTests/WorkspaceTests.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.
@bnbarham bnbarham force-pushed the build-system-override branch from d9bba40 to 3a4d11e Compare December 20, 2024 20:36
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants