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 process argument limit error when building on Windows #138

Merged
merged 2 commits into from
Sep 30, 2023

Conversation

tishin
Copy link
Contributor

@tishin tishin commented Sep 28, 2023

Building SwiftGodot with full list of generated sources on Windows exceeds the 32K symbol limit of CreateProcess resulting in

error: command Compiling Swift Module 'SwiftGodot' (899 sources) failed: unable to spawn process 'C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\swiftc.exe' (The filename or extension is too long.)

Merging all generated sources into a single file should fix the issue for now until it's resolved from the SPM side (or maybe modularization of sources in the project).

@migueldeicaza
Copy link
Owner

Makes sense.

One possible optimization for Windows would be to split the sharedPrinter from the printer, but pass a flag indicating that the generated output is being blended. And then concatenate the various outputs of printers at the end.

The sole reason for that is that it significantly reduces the build time.

Happy to merge in this way if you prefer.

@migueldeicaza migueldeicaza merged commit 77feb71 into migueldeicaza:main Sep 30, 2023
1 check passed
@migueldeicaza
Copy link
Owner

Thank you for the update!

@tishin tishin deleted the win-createprocess-fix branch September 30, 2023 15: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.

2 participants