Closed wsfulton closed 1 week ago
@wsfulton Thanks for creating the issue and letting us know.
Before taking time to investigate, I'm curious if this is also happening in official release versions prior to 0.9.10? I'm just trying to get an understanding if this is a general bug, or if it was introduced in the past 2 versions. Thanks!
Version 0.8.22:
Error while running the compiler args parser script '/home/william/.vscode-server/extensions/ms-vscode.makefile-tools-0.8.22/assets/parseCompilerArgs.sh' for regions (" -g -Wall -W -pedantic -MT CParse/cscanner.o -MD -MP -c -o CParse/cscanner.o CParse/cscanner.c &&\)": "/bin/sh: 1: Syntax error: Unterminated quoted string
"
The compiler args parser script '/home/william/.vscode-server/extensions/ms-vscode.makefile-tools-0.8.22/assets/parseCompilerArgs.sh' failed with error code 2 for regions ( -g -Wall -W -pedantic -MT CParse/cscanner.o -MD -MP -c -o CParse/cscanner.o CParse/cscanner.c &&\)
Sending configuration for file /home/william/swig/github/swig/Source/CParse/cscanner.c -----------------------------------
Version 0.7:
Error while running the compiler args parser script '/tmp/parseCompilerArgs.sh' for regions (" -g -Wall -W -pedantic -MT CParse/cscanner.o -MD -MP -c -o CParse/cscanner.o CParse/cscanner.c &&\)": "/bin/sh: 1: Syntax error: Unterminated quoted string
"
The compiler args parser script '/tmp/parseCompilerArgs.sh' failed with error code 2 for regions ( -g -Wall -W -pedantic -MT CParse/cscanner.o -MD -MP -c -o CParse/cscanner.o CParse/cscanner.c &&\)
Sending configuration for file /home/william/swig/github/swig/Source/CParse/cscanner.c -----------------------------------
Version 0.6:
Error while running the compiler args parser script '/tmp/parseCompilerArgs.sh' for regions (" -g -Wall -W -pedantic -MT CParse/cscanner.o -MD -MP -c -o CParse/cscanner.o CParse/cscanner.c &&\)": "/bin/sh: 1: Syntax error: Unterminated quoted string
"
The compiler args parser script '/tmp/parseCompilerArgs.sh' failed with error code 2 for regions ( -g -Wall -W -pedantic -MT CParse/cscanner.o -MD -MP -c -o CParse/cscanner.o CParse/cscanner.c &&\)
Sending configuration for file /home/william/swig/github/swig/Source/CParse/cscanner.c -----------------------------------
Incidentally, this is for the swig project, but first requires the Makefile.in modification in #98 in order to avoid an infinite loop when make is invoked with make source --dry-run --always-make --keep-going --print-directory
.
@wsfulton Got it, so these seems like a general bug that has been present for a while and this issue has helped us find it. Thanks! I'll mark it as a bug and place it on the backlog, we will fix it as soon as we can based on bandwidth
For what's worth, i incidentally also just ran over the same issue today with OFI's libfabric (https://github.com/ofiwg/libfabric.git )
@wsfulton @g2flyer Could you all test the following vsix and see if it resolves this issue for you?
You'll need to download the zip file, change the extension to .vsix, and then you'll need to install it into VS Code manually to test. Thanks!
@wsfulton @g2flyer Could you all test the following vsix and see if it resolves this issue for you?
You'll need to download the zip file, change the extension to .vsix, and then you'll need to install it into VS Code manually to test. Thanks!
still get the (seemingly identical) error 'ad ccharacters in variable name '' ... :-(
@g2flyer I'm not sure I understand the error you got, could you please add a screenshot with some context for the error message when it got output? Thanks!
@g2flyer I'm not sure I understand the error you got, could you please add a screenshot with some context for the error message when it got output? Thanks!
Ooops, the quoted error was actually due to a merge conflict i overlooked. But after fixing that and rerunning the tests i still get the (real :-) old problem parseCompilerArgs.sh for regions ( -Wall -O2 -pipe -fvisibility=hidden -Wall -Wundef -Wpointer-arith -MT util/info.o -MD -MP -c -o util/info.o util/info.c &&\): /bin/sh: 1: Syntax error: Unterminated quoted string
. Thinking that actual text files are easier to analyze, i've created a zip file with the makefile tools output and the dryrun.log file for both the standard extension and above referenced manually installed extension: makefile-tools-tests.zip
@g2flyer Ah, thanks for the follow up and the additional information, I think I've figured out what was happening, could you test this extension?
@g2flyer Ah, thanks for the follow up and the additional information, I think I've figured out what was happening, could you test this extension?
i tried but didn't seem to work (i.e., no intellisense) :-( From log-files below it seems there is some issue with all the undefined
and no real action shown. One thing, though. Regardless on how i tried to configure (automatically after install, using Makefile: Clean Configure or Makefile: Reset (for troubleshooting)) it run for a long time with the pop-up 'Configuring from cache ...'. I wonder whether the cache might be the problem but i couldn't quickly figure out on how to remove the cache ...
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
Yes
undefined
undefined
undefined'make --dry-run --always-make --keep-going --print-directory'
undefined
undefined
undefined
undefined
undefined
undefined
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
undefined
undefined
undefined
undefined
undefined
undefined
undefined'make all --print-data-base --no-builtin-variables --no-builtin-rules --question'
undefined
undefined
undefined
undefined
undefined
undefined
undefined
loadFromCache: undefined = 0, undefined = 0.02
generateParseContent: undefined = 0, undefined = 77.753
preprocessParseContent: undefined = 0, undefined = 0
parseIntelliSense: undefined = 0, undefined = 2.844
parseLaunch: undefined = 0, undefined = 0.226
dryrunTargets: undefined = 1, undefined = 0.129
parseTargets: undefined = 0, undefined = 0.065
undefined
undefined
Yes
undefined'make --dry-run --always-make --keep-going --print-directory'
undefined
undefined
undefined
undefined
undefined
undefined
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
Messages not found.
undefined
undefined
undefined
undefined
undefined
undefined
undefined'make all --print-data-base --no-builtin-variables --no-builtin-rules --question'
undefined
undefined
undefined
undefined
undefined
undefined
undefined
generateParseContent: undefined = 0, undefined = 75.888
preprocessParseContent: undefined = 0, undefined = 0
parseIntelliSense: undefined = 0, undefined = 2.911
parseLaunch: undefined = 0, undefined = 0.162
dryrunTargets: undefined = 1, undefined = 0.12
parseTargets: undefined = 0, undefined = 0.063
undefined
undefined
@g2flyer Hm, very interesting, when I tested with the dryrun log files that you sent, it seemed to work as expected.
UPDATE: I think I found the issue, here's the vsix: makefile-tools.zip
However, I don't expect that this will fix your issue. While it seems to better handle line continuation characters, it seems like there is still something going on with your dry-run file and with our parsing that is causing issues.
Please let me know if you can confirm my suspicions, and I can investigate further.
@g2flyer Hm, very interesting, when I tested with the dryrun log files that you sent, it seemed to work as expected.
UPDATE: I think I found the issue, here's the vsix: makefile-tools.zip
However, I don't expect that this will fix your issue. While it seems to better handle line continuation characters, it seems like there is still something going on with your dry-run file and with our parsing that is causing issues.
Please let me know if you can confirm my suspicions, and I can investigate further.
Yes, the new version returns to the log-files i got in the past. And yes, it didn't solve the problem but there was a subtle difference: Previously the error was
Error running the compiler args parser script /home/msteiner/.vscode-server/extensions/ms-vscode.makefile-tools-0.7.0/assets/parseCompilerArgs.sh for regions ( -Wall -O2 -pipe -fvisibility=hidden -Wall -Wundef -Wpointer-arith -MT util/info.o -MD -MP -c -o util/info.o util/info.c &&\): /bin/bash: -c: line 2: syntax error: unexpected end of file
while now it is
Error running the compiler args parser script /home/msteiner/.vscode-server/extensions/ms-vscode.makefile-tools-0.7.0/assets/parseCompilerArgs.sh for regions ( -Wall -O2 -pipe -fvisibility=hidden -Wall -Wundef -Wpointer-arith -MT util/info.o -MD -MP -c -o util/info.o util/info.c &&): /bin/bash: -c: line 2: syntax error: unexpected end of file
Note that the \
disappeared. So seems kindof as if in the processing the backslash was removed but not joined with following line (i.e., only \ was removed and not also newline if rest of parsing handles &&-joined instructions or also the && should have been removed?)
@g2flyer First, thanks for all of your help testing and being so quick to respond, it's very helpful and appreciated.
That being said, I think I have some progress, could you try this? makefile-tools.zip
I still see an issue where some failures happen due to some command lines being too long, but I'm not sure there is much to be done about that, because that failure seems to be failing from the execution of the script itself and I'm not sure what control we can have of that.
Thanks
@g2flyer First, thanks for all of your help testing and being so quick to respond, it's very helpful and appreciated.
That being said, I think I have some progress, could you try this? makefile-tools.zip
I still see an issue where some failures happen due to some command lines being too long, but I'm not sure there is much to be done about that, because that failure seems to be failing from the execution of the script itself and I'm not sure what control we can have of that.
With this version the parser error disappeared from the log, in the summary of the log there is a return code=1 from dryrunTargt. Find attached that log-file plus the referenced one (where i couldn't find anything suspicious but maybe you can).makefile-tools.v3.zip
BTW: if it help you for me to do additional investigations, run particular scripts or alike, just let me know.
@g2flyer Any additional information or investigation is always appreciated, I may not get to more investigation until tomorrow or after, but thanks for the feedback.
It sounds like technically the original issue for this item is fixed, the line continuation is being handled. However, you're still hitting an issue?
For example, what's the specific issue you're still seeing and what's the outcome of the issue you're seeing? Are you not able to get intellisense? Etc. Thanks!
For example, what's the specific issue you're still seeing and what's the outcome of the issue you're seeing? Are you not able to get intellisense? Etc. Thanks!
Yep, no intellisense ...
@g2flyer I looked a little closer, and I believe I was correct in this comment: https://github.com/microsoft/vscode-makefile-tools/issues/628#issuecomment-2420309158. One of the lines in the dryrun.log is exceptionally long and therefore the script hits an error due to a command-line being much too long.
I copied the specific lines that show the error in the output log below. error.log
@g2flyer I looked a little closer, and I believe I was correct in this comment: #628 (comment). One of the lines in the dryrun.log is exceptionally long and therefore the script hits an error due to a command-line being much too long.
I copied the specific lines that show the error in the output log below. error.log
Ah, i see it there, although i cannot see that error in the three log-files i found and sent you: are there more log-files which i missed or is this visible only when running in debug mode or command-line or alike? Actually, is there an (easy :-) way to run the processing on the command-line to be more easily able to debug? Presumably it would be some invocation of main.js
in some form? Also, what is the maximum length supported? With all the jsons main.js was not immediately digestable that i could find location. Also thought first it would be a shell-limitation but if i run the compileArgsParse script it accepts these 315 argument string on the command-line (at least in bash) ...
PS: oh, looking closer at your error.log
i notice you ran it on windows, not linux! While my vscode UI runs in windows, the actual extension is run for my on WSL/linux, so this could be related that i don't see the too long error in my log-files?
@g2flyer I just tested the repro that you sent by opening it up in WSL and I'm not reproducing the issue you describe. Because of this, I think that the PR #659 is ready to go in. However, if you are still facing the issues, then I definitely want to investigate them, and it would likely be best served by creating a new issue specific to the issue that you are still facing.
When I tested the reproduction, I didn't see any error outputs in the Makefile output channel or the log.
Could you possibly open a new issue for specifically the issue that you are still seeing? I understand it might be duplication, but since the referenced PR fixes the issue with the line continuation backslash, I plan to close this issue when it merges. Thanks!
@g2flyer I just tested the repro that you sent by opening it up in WSL and I'm not reproducing the issue you describe.
Curious, with which distro version and wsl version could you successfully build intellisence for https://github.com/ofiwg/libfabric.git? And was that with the Windows version of VC or VC directly running in WSL? I just retried for that current main
of that repo with both the last version of the .vsix
you attached and the latest official version you get when updating online. The official version still results in the log-visible syntax error. That error goes away when i use the .vsix (and still exists in the official version as i guess the merged PR659 hasn't yet trickled down to the official store?). However, while in the latter case there is no error message anymore, in both cases, it still results in dryrunTargets: return code = 1
in the summary section at the end of the log and, more importantly, in neither variant intellisense is not active.
Because of this, I think that the PR #659 is ready to go in. However, if you are still facing the issues, then I definitely want to investigate them, and it would likely be best served by creating a new issue specific to the issue that you are still facing.
When I tested the reproduction, I didn't see any error outputs in the Makefile output channel or the log.
Could you possibly open a new issue for specifically the issue that you are still seeing? I understand it might be duplication, but since the referenced PR fixes the issue with the line continuation backslash.
Ok, will do. However, i probably do that best only after PR #659 is in the official release? Could you let me know when that happens?
@g2flyer The PR #659 should be in the latest pre-release version 0.12.10. Thanks!
Using Makefile Tools version 0.10.16 prerelease version as well as 0.9.10 release.
Whatever chunks up dryrun.log into regions, probably needs to filter out line continuation backslash characters at the end of the string passed to parseCompilerArgs.sh or maybe join up with the next line/region.
This is the error message:
Relevant line from dryun.log:
Relevant snippet from Makefile:
Joining the lines instead of using a line continuation backslash does work around the problem:
However, the Makefile is generated by automake, so not a workable solution.