-
Notifications
You must be signed in to change notification settings - Fork 61
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
Semicolon in single quotes causes dryruntarget to fail #671
Comments
Hi @wkdzzb, thanks for reporting issue. |
I wrote a makefile and appended these, and it repeats $(target):$(obj)
$(GCC) $(C_FLAGS) $^ $(head) -o $@
make: Entering directory '/root/code/kernel-5.10.0-60.18.0.50.oe2203'
gcc -o arch/x86/tools/relocs arch/x86/tools/relocs_32.o arch/x86/tools/relocs_64.o arch/x86/tools/relocs_common.o;
echo 'echo 123; arch/x86/tools/relocs --abs-relocs vmlinux' > ./tmp |
@wkdzzb Also, is this currently blocking you? Or is this something that you're able to workaround by slightly modifying your makefile? Additionally, does this still repro if you use double quotes? |
Update, my initial thoughts are that our first iteration of a possible fix could simply be to not do the replacement if it's within quotes like that, but this will require more investigation and input from @wkdzzb |
I can confirm that this is not a new or regression issue in the latest versions. I tested all versions of makefile tools from 0.8 to 0.12, and this issue exists in all of them. Additionally, I tried using double quotes, but the issue still occurs. |
This is not blocking me; however, it does cause issues with VSCode's hints and code completion, resulting in many errors being reported. The makefile is also difficult to modify since it is the kernel's makefile. |
I think replacing a semicolon with a newline inside single or double quotes is problematic, as it can break the original shell commands. However, replacing a semicolon with a newline outside of quotes should not be an issue. |
@wkdzzb Understood, thanks for the additional testing and context. I tend to agree that replacing a semicolon within quotes can cause issues, the best fix here may be to simply overlook those cases and not replace the semicolon with a newline. |
makefile-tools version:0.11.13
dryrun.log
Makefile tools output
I found the real reason is the function preprocessDryRunOutput.
the function preprocessDryRunOutput replaces ';' with '\n',but in some shell cmd, like this
replace ';' with '\n'
it will cause an error
The text was updated successfully, but these errors were encountered: