Skip to content

Allow configuring workspace type via flag #988

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

Merged
merged 6 commits into from
Dec 12, 2023

Conversation

z2oh
Copy link
Contributor

@z2oh z2oh commented Dec 6, 2023

Fixes #984

I opted to log an error and continue with no build system set if the selected workspace type fails to create. A reasonable alternative might be to fall back to default selection logic, but this might make it harder to tell if something is wrong.

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.

Thank you @z2oh! A couple comments inline. I think it would also be good to support configuration of workspace types on a per-workspace basis, similar to how you can specify compiler arguments per workspace since #974.

@z2oh
Copy link
Contributor Author

z2oh commented Dec 7, 2023

Thanks for the quick review! I've made local changes per your inline suggestions. To support per-workspace configuration, am I correct in understanding this would be a configuration setting in the Swift VSCode extension? (Most likely extending this interface https://github.com/swift-server/vscode-swift/blob/4822e95cde97928a176f05a08e4e7ff581297ee7/src/configuration.ts#L45 )

@ahoppen
Copy link
Member

ahoppen commented Dec 8, 2023

To support per-workspace configuration, am I correct in understanding this would be a configuration setting in the Swift VSCode extension?

The goal here is to expose these configuration options from sourcekit-lsp. Adding configuration to the VS Code Swift extension would be a second step. AFAIK the VS Code Swift extension doesn’t have the capability to set any of the workspace-specific parameter offered by #974 yet but it’s something that we want to add in the future. And since the release cycles of sourcekit-lsp are longer than those of the VS Code extension (since it’s tied to the Swift releases), it’s good to design for these configuration options. So, to clarify: I’m not asking you to also modify the VS Code Swift extension.

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.

Thank you 🙏🏽

@ahoppen
Copy link
Member

ahoppen commented Dec 9, 2023

@swift-ci Please test

@z2oh
Copy link
Contributor Author

z2oh commented Dec 11, 2023

Okay, I think I fixed the tests. I'm developing on Windows with limited testing support, but I was able to get things set up in Windows subsystem for Linux so that I could compile the tests. Thanks for your patience 🙏

@ahoppen
Copy link
Member

ahoppen commented Dec 11, 2023

@swift-ci Please test

@ahoppen
Copy link
Member

ahoppen commented Dec 11, 2023

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Member

ahoppen commented Dec 11, 2023

@swift-ci Please test Windows

@ahoppen ahoppen enabled auto-merge December 11, 2023 20:18
auto-merge was automatically disabled December 11, 2023 22:05

Head branch was pushed to by a user without write access

@ahoppen
Copy link
Member

ahoppen commented Dec 11, 2023

@swift-ci Please test

@ahoppen
Copy link
Member

ahoppen commented Dec 11, 2023

@swift-ci Please test Windows

@ahoppen ahoppen merged commit d931806 into swiftlang:main Dec 12, 2023
@z2oh z2oh deleted the configure-workspace-type branch December 12, 2023 19:39
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.

Option to prefer compilation database build system
2 participants