-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
"filename or extension is too long" when building many source files #572
Comments
Thanks for reporting. I think this is because we replace paths to Go source with temporary paths, so the command
becomes
You can see how this can balloon the size of each invocation of the compiler, which is likely how you are running into a command size limit of 32KiB. It seems like some regular Go builds can already run into this, like golang/go#47235. I'm not sure if we have a good and easy fix for this. We don't want to modify the source files in-place, because that could easily lead to data loss or races with other processes. We likely don't want to |
Ah, upstream Go does support "response files" as arguments to the toolchain, which are just lists of arguments written to a single file to sidestep the limit. See golang/go#18468. We're running into the issue because |
I think our best bet is to copy upstream's code to replace argument lists with response files. I can look into it when I have the time. |
Sorry, what do you mean? This is about |
What version of Garble and Go are you using?
What environment are you running Garble on?
go env
OutputWhat did you do?
I tried to complie a project with lib
github.com/gotd/td
but there is a error occure.What did you expect to see?
Compile successfully
What did you see instead?
Error above
I notice that the command works fine in Linux. Then I found out that the error
The filename or extension is too long
will be throw when a command has more than 32k byte exec in Windows.This probably is Windows' fault but I still want to post this here and try to find solution together!
Any help would be much appreciated!
English is not my first language, sorry for that.
The text was updated successfully, but these errors were encountered: