We've been seeing an issue lately (= last 5 days) that apparently has nothing do with any change.
It's practically the exact same code, only after the upgrade of GitHub's runners (Windows 20240421.1.0 to 20240514.3.0), it keep crashing consistently with the exame same error message. I even diff-checked the logs to be able to spot the differences: https://www.diffchecker.com/8DhFPIza/
The error we've been getting is:
CC: vm/values/operaD:\a\arturo\arturo\.cache\@[email protected]: In function 'completionsCback__helpersZrepl_u24':
D:\a\arturo\arturo\.cache\@[email protected]:583:80: error: passing argument 1 of 'linenoiseAddCompletion' from incompatible pointer type [-Wincompatible-pointer-types]
583 | linenoiseAddCompletion(lc_p1, nimToCStringConv(colontmpD__5));
| ^~~~~
| |
| tyObject_LinenoiseCompletions__vHTaA31a7cRxxKiWyfvAxA *
In file included from D:\a\arturo\arturo\.cache\@[email protected]:9:
D:\a\arturo\arturo\src\extras/linenoise/linenoise.h:65:51: note: expected 'linenoiseCompletions *' but argument is of type 'tyObject_LinenoiseCompletions__vHTaA31a7cRxxKiWyfvAxA *'
65 | void linenoiseAddCompletion(linenoiseCompletions *comp, const char *str);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
D:\a\arturo\arturo\.cache\@[email protected]: In function 'initRepl__helpersZrepl_u12':
D:\a\arturo\arturo\.cache\@[email protected]:748:36: error: assignment to 'void (**)(const char *, tyObject_LinenoiseCompletions__vHTaA31a7cRxxKiWyfvAxA *, void *)' from incompatible pointer type 'void (*)(const char *, tyObject_LinenoiseCompletions__vHTaA31a7cRxxKiWyfvAxA *, void *)' [-Wincompatible-pointer-types]
748 | completionCallback = completionsCback__helpersZrepl_u24;
| ^
D:\a\arturo\arturo\.cache\@[email protected]:750:55: error: passing argument 1 of 'linenoiseSetCompletionCallback' from incompatible pointer type [-Wincompatible-pointer-types]
750 | T15_ = linenoiseSetCompletionCallback(completionCallback, NIM_NIL);
| ^~~~~~~~~~~~~~~~~~
| |
| void (**)(const char *, tyObject_LinenoiseCompletions__vHTaA31a7cRxxKiWyfvAxA *, void *)
D:\a\arturo\arturo\src\extras/linenoise/linenoise.h:59:91: note: expected 'void (*)(const char *, linenoiseCompletions *, void *)' but argument is of type 'void (**)(const char *, tyObject_LinenoiseCompletions__vHTaA31a7cRxxKiWyfvAxA *, void *)'
59 | linenoiseCompletionCallback * linenoiseSetCompletionCallback(linenoiseCompletionCallback *comp, void *userdata);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
compilation terminated due to -fmax-errors=3.
And the relevant Nim code is here: https://github.com/arturo-lang/arturo/blob/master/src/helpers/repl.nim#L64
Any ideas/pointers as to how we could go about it?
If the question is about Nim, we've been using the latest one (2.0.4) all the way through - tried with 2.0.2 but no difference at all.
If the question is about GCC, that's the second change I've noticed:
mingw-w64-x86_64-gcc-13.2.0-6 (the old one) vs mingw-w64-x86_64-gcc-14.1.0-3 (the new one)
I think you are spot on!
Thanks a lot for the pointer!!
Now, let's see how we do it so that it uses the this particular branch!
Thanks again, seriously! :)
This actually did the trick, without having to resort to pulling the devel branch.
Thanks a lot guys! You've saved me a lot of head-banging-against-the-wall lol
(Not to mention that whenever I see (yet another) Windows-related issue, I'm on the verge of having a panic attack... lol)
Well,
LinenoiseCompletions* {.bycopy, importc: "linenoiseCompletions".} = object
len*: csize_t
cvec*: cstringArray
Shouldn't importc: linenoiseCompletions be used? It doesn't seem to be a Nim bug to me