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

Fix build command execution on Windows using Swift 5.10 #423

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

tishin
Copy link
Contributor

@tishin tishin commented Mar 12, 2024

Fixes #418

We have two build commands here:

  1. prebuildCommand which works as a source generator on Windows, but shouldn't work by design (on macOS it throws a prebuild command cannot use executables built from source, including executable target 'Generator'). On Swift 5.9 this command also added sources from outputFilesDirectory to the build, which does not happen on Swift 5.10. Not sure if we should report this, as our use case is wrong to begin with.
  2. buildCommand which does not generate sources on Windows (the .exe never gets called), but works as a source provider through outputFiles. I have already reported the issue at Build command doesn't get executed on Windows swiftlang/swift-package-manager#6962

So combining the two broken things makes the build work again on Swift 5.10 toolchain. This shouldn't affect 5.9 builds, as buildCommand does not add any actual workload to the build.
I wish there was a less hacky solution.

@tishin
Copy link
Contributor Author

tishin commented Mar 12, 2024

Disabled buildCommand on Swift 5.9 for Windows since 5.9 github action got stuck.

@migueldeicaza migueldeicaza merged commit 5eab7ad into migueldeicaza:main Mar 12, 2024
2 checks passed
@migueldeicaza
Copy link
Owner

I merged the request- I hope this doesn't break the 5.9 folks for now, but hopefully we will all love to 5.10 soon

@tishin
Copy link
Contributor Author

tishin commented Mar 13, 2024

5.9 still uses original prebuildCommand hack without additional buildCommand. It shouldn't break.

@tishin tishin deleted the fix-win-commands branch March 15, 2024 19:50
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.

Windows: Unable to build SwiftGodot using Swift 5.10 toolchain
2 participants