Closed Remiliap closed 2 months ago
@Remiliap Hi! Thanks for posting this issue. Could you confirm for me what versions this happens on? I'd like to confirm that this is a generic bug and not a regression in our most recent release. Thanks!
v0.8.22
@Remiliap A couple of questions:
@gcampbell-msft I tried versions 0.5 to 0.7 and all of them encountered this bug
To reproduce this bug, run the configuration using the Makefile generated by the following Python code
with open("Makefile","w") as file:
file.write("all:\n\tg++ -DDEF")
for n in range(10000):
file.write(" f{}.cpp".format(n))
Then create two CPP files named f0.cpp and f9999.cpp and check if the macro definition is configured
#ifdef DEF
void t() {}
#endif
@Remiliap Does this issue still reproduce in the most recent pre-release version? I am not able to reproduce this on my machine.
@Yingzi1234 Could you help in trying to reproduce? Thanks!
@Remiliap We are trying to reproduce your issue but we can't reproduce it based on the information you provided, could you provide us with the folder you reproduced?
Please feel free if you have any doubt!
@Yingzi1234 I still have this issue on v0.9.10
Look at this repository https://github.com/Remiliap/makefile_tool_bug_repro
I can use build_log to configure the project normally, but in dry run mode, f9999.cpp is not configured.I copied the last few lines of the output into the output file.The dry-run.log file is the dry run output described in the output.
I used to think that the reason for the problem was that the dry-run output was truncated into two lines, as seen in the dry-run.log file.But in the output, the configuration proceeded normally to f6656.cpp.
@gcampbell-msft @Remiliap Based on the repository you provided, we tried to reproduce your issue. However, we were unable to reproduce it on latest version, you can get the details below.
ENV:
Repro steps:
Actual result: It was configured successfully
@Remiliap I just attempted to download your git repository and repro the problem, and I was able to reproduce. I am doing a small investigation now.
@Remiliap I think I have determined that the issue is because the compile command is split up into two lines due to it's length, and the make.exe invocation is outputting into different callbacks to stdout
: https://github.com/microsoft/vscode-makefile-tools/blob/main/src/make.ts#L725.
I'm not sure what the best way to fix this is, so it might take some time for a fix to be inserted, but I'll brainstorm and investigate. 👍
I have a compile command whose output is very long, and I found that it was truncated into two lines in the dryrun.log file at position 65537, which caused the configuration to be incorrect.