You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redo PR 241: parsing complex scenarios of quoting and escaping. (#243)
* Redo PR 241: parsing complex scenarios of quoting and escaping.
* add temporary logging to see how much of the new test is executing
* Break up the new windows test in two to compare smaller baseline/output strings.
* Try cl instead of gcc so that the CI machines don't find the tool in their path and report full (machine dependent) path for compiler path.
* Undo previous mistake, we need gcc not cl but ensure preconfigure adds a path to these compilers inside our repository
* Cover more interesting scenarios for compiler path while also ensuring uniformity between systems
* Fix linux test baseline according to latest changes in the dryrun
logger.message(`The compiler args parser script '${parseCompilerArgsScriptFile}' failed with error code ${result.returnCode} for regions (${compilerArgRegions})`,"Normal");
503
503
}
504
504
}catch(error){
505
505
logger.message(error);
@@ -532,16 +532,30 @@ function parseMultipleSwitchFromToolArguments(args: string, sw: string, removeSu
// The basic pattern for anything between quotes accepts equally single quote, double quote or back tick.
536
+
// One pattern that is accepted is to wrap between escaped quotes and allow inside anything (including non-escaped quotes) except escaped quotes.
537
+
// Another pattern that is accepted is to wrap between non-escaped quotes and allow inside anything (including escaped quotes) except non-escaped quotes.
538
+
// One problem with the "..." pattern is that a simple "\" (or anything ending with \") will not know if the backslash is part of the inside of quote-quote
539
+
// or together with the following quote represents a \" and needs to look forward for another ending quote.
540
+
// If there is another quote somewhere else later in the command line (another -D or a file name wrapped in quotes) everything until that first upcoming quote
541
+
// will be included.
542
+
// Example that doesn't work: -DSLASH_DEFINE="\" -DSOME_OTHER_SWITCH "drive:\folder\file.extension"
543
+
// SLASH_DEFINE is equal to '\" -DSOME_OTHER_SWITCH '
544
+
// Example that works: -DGIT_VERSION=" \" 1.2.3 \" "
545
+
// GIT_VERSION is equal to ' \" 1.2.3 \" '
546
+
// Unfortunately, we also can't identify this to log in the output channel for later analysis of more makefile switch and quoting user scenarios.
547
+
// Fortunately, we didn't encounter the last scenario, only the first.
@@ -183,7 +184,6 @@ Found the following 29 build targets defined in the makefile: 8cc;all;buffer.o;c
183
184
Complete list of build targets: 8cc;all;buffer.o;clean;cleanobj;cpp.o;debug.o;dict.o;encoding.o;error.o;file.o;fulltest;gen.o;lex.o;main.o;map.o;parse.o;path.o;runtests;self;set.o;stage1;stage2;stage3;test;testtest;utiltest;utiltest.o;vector.o
184
185
Parsing build targets elapsed time: 0
185
186
Configure finished. The status for all the subphases that ran:
186
-
loadFromCache: return code = -3, elapsed time = 0
187
187
generateParseContent: return code = 0, elapsed time = 0
188
188
preprocessParseContent: return code = 0, elapsed time = 0
189
189
parseIntelliSense: return code = 0, elapsed time = 0
@@ -193,7 +194,6 @@ Found the following 21 build targets defined in the makefile: Arch1_main.exe;Arc
193
194
Complete list of build targets: Arch1_main.exe;Arch2_main.exe;Arch3_main.exe;Execute_Arch1;Execute_Arch2;Execute_Arch3;all;buildArch1;buildArch2;buildArch3;builds;clean;create_dirs;create_dirs_Arch1;create_dirs_Arch2;create_dirs_Arch3;install;rebuild;runs;simple;simple/simple.exe
194
195
Parsing build targets elapsed time: 0
195
196
Configure finished. The status for all the subphases that ran:
196
-
loadFromCache: return code = -3, elapsed time = 0
197
197
generateParseContent: return code = 0, elapsed time = 0
198
198
preprocessParseContent: return code = 0, elapsed time = 0
199
199
parseIntelliSense: return code = 0, elapsed time = 0
0 commit comments