-
-
Notifications
You must be signed in to change notification settings - Fork 114
arduino-builder on Travis-CI Win32 instance error reporting results in another error, "errors.errorString invalid syntax" #333
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
Comments
From the log it looks like something horrible is going on with paths handling (unix -> win -> cygwin-like)
|
Ah, and I'm moving back the issue to arduino-builder repo |
Thanks @facchinm for looking at it. The slash conversion is handled in our Python scripts which are Linux/MacOS native and patched minimally to run within the Win32 bash that Travis-CI uses. So the command is printed with The exec line boils down to: I can definitely believe that there's something mistaken there, but I would expect an error message and not an exception trying to print the actual error message. :) |
@earlephilhower in theory windows should handle both forward and backward slashes, I think you don't need to do the conversion at all. |
Yes, @cmaglie, I believe you're right. I started without changing the slash direction, got the same The exception backtrace points to a simple string adjustment failing, not even looking at the directories passes in yet (line 249): Lines 247 to 249 in bc2846e
with Lines 427 to 437 in bc2846e
|
yes it comes from |
ok, it seems that there are many things going on here, but let's start from your call to
if I read it correctly, the command line arguments are obtained by splitting on spaces the string
so the resulting array of arguments should be (one arg per line):
I think that you have an extra pair of quotes on each path argument that is passed to the builder process as-is. I think that this is wrong you may probably want to try to edit the command line and remove the extra quotes (or maybe create directly an array without string splitting). The function
as we can see, if the argument So I'll go ahead and fix the function, but if my analysis is correct, you should remove anyway the extra quotes from the parameters as I said. |
Thanks, @cmaglie . The extra quote was a cut-n-paste error in my description above. The actual params passed in to the Popen are programmatically generated, of course (we run 100s of tests), but your observation about the quotes on the parameter paths is correct. We do have quotes around them, I will remove them and drop the backslash format (I don't see how users will be able to specify the drive, unfortunately, w/o backslash paths so I think your fix will ultimately be needed by generic Win users who might be running Arduino standalone from, say, a USB stick, or a d:\Users directory on a VDI instance) |
I can confirm that removing any quotes around paths does fix the issue. Thanks for your help! |
We're running fine, now. I'll close this since it looks like my own problem. As an aside, in my usage I actually did need the Thanks for looking into it! |
Bug Report
Just to be up front, I'm not sure if this is an error in arduino-builder(really, inside -cli now) or an issue with the beta Travis-CI Windows VMs.
When trying to report some error, arduino-builder actually ends up with an exception in the error printing routines themselves. (I can't really identify the first error it's trying to report exactly, since its crashing while trying to print it, but I believe from the trace it's related to a
hardware
directory issue in my CI setup.) I'm fine with having a bug in my new CI config, but with it crashing I can't actually see what the problem is.Current behavior
(taken from an esp8266-Arduino CI run on Travis-CI under Windows at https://api.travis-ci.org/v3/job/582174496/log.txt )
Expected behavior
I'd expect the appropriate error message to be displayed.
Environment
arduino-cli version
): arduino-builder nightly from https://downloads.arduino.cc/arduino-nightly-linux64.tar.xzThe text was updated successfully, but these errors were encountered: