-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
Command Line Parameters with double quotation marks are not parsed properly by C runtime library used on windows platform by GO, ["TestPassword"] results in [TestPassword]. Quotes filtered out, no escape possible. #69057
Comments
Hopefully fixed soon. This is preventing me from experimenting/developing with ViteLabs vite blockchain project on Microsoft Windows. Posted this comment right after above comment, reading above comment... My problem is not related to powershell, but cmd.exe where I would like to run: govite command line parameters. Strangely enough: ["Test"] Now works in my test program, have not tested it yet with this particular go test program. I believe what may be happening is that this bug may have been fixed in some go version. And the vitelabs govite exe might have been compiled/build with an older version still containing the bug. I will try re-building govite and see if this fixes the problem. |
For what it is worth here is go.mod from this vitelabs vite project:
Maybe this can prove it's using an old enough version of go to be a problem, if so this go.mod needs updating to new version and hope all compiles well... investigating... |
I tried to replicate problem by changing go.mod of my test project to same version as this vitelabs vite go version: However I was unable to re-create the problem. Strange. |
Only thing I can think of is that C runtime library got updated... because of my experiments, that could explain why it's now fixed... or there is a bizar threading/race condition issue but I don't think so... so changing go versions might not be enough to replicate ancient behaviour, if true another bad sign for GO language. The correct way would have to be replace C runtime library that GO or LiteIDE uses with an older one. But at this point I am lost, I do not want to get involved in ancient C garbage, I came here for GO, not old messy C never building mess with missing make crap on windows, had enough of that. Even with make installed from gnuwin C builds usually still fail somehow on windows, maybe this is one of the reasons why, don't know, for my open source C written on Linux is dead to me, a big waste of time. If it's working for you great, anyway for now I consider this issue somewhat solved, but I have no idea how it was solved for sure. Except this mysterious C runtime library update hypothesis. For that reason I will leave this open, until somebody can confirm what the reason is why it's suddenly working. Can you re-produce the failure ?! and prove this hypothesis ?! |
Another hypothesis why it might have worked this time: It could be that C runtime library was already loaded into memory because LiteIDE was running and windows did not re-load the older C runtime library, because of library memory sharing/DLL runtime behaviour. While co-pilot confirms this hypothesis is possible for DLLs, GOLANG does not seem to rely on DLLs on Windows, not entirely sure though bot could be wrong: "
However, this scenario can also lead to DLL Hell, where conflicting versions of DLLs cause unpredictable behavior. It’s generally better to ensure that each application uses the correct version of its required DLLs to avoid such issues12. If you have any specific issues or need further assistance, feel free to ask! and " I searched GO installation folder, no DLLs there, also GOPATH no DLLs there... So I doubt this hypothesis for now, probably static linked library... |
This doesn't appear to be a Go bug. |
Go version
go version go1.22.2 windows/amd64
Output of
go env
in your module/workspace:What did you do?
Trying to pass: ["TestPassword"]
Tried all kinds of escape characters. " " Simply gets filtered out resulting in wrong input: [TestPassword]
What did you see happen?
Wrong input: [TestPassword]
What did you expect to see?
["TestPassword"]
The text was updated successfully, but these errors were encountered: