Skip to content

Commit 18bc7c5

Browse files
committed
Archive binlogs and fix wpf maybe?
1 parent e54eed4 commit 18bc7c5

File tree

4 files changed

+49
-15
lines changed

4 files changed

+49
-15
lines changed

.artifactignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/*
2+
!*.binlog

azure-pipelines.yml

+3
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,7 @@ jobs:
183183
-WebappName netsourceindex
184184
-StorageAccountName netsourceindex
185185
186+
- publish: bin/repo
187+
artifact: repo-logs
188+
186189

src/SourceBrowser/src/HtmlGenerator/Program.cs

+6
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,12 @@ private static void IndexSolutions(
338338
Log.Write($"Skipping Ref Assembly project {invocation.ProjectFilePath}");
339339
continue;
340340
}
341+
342+
if (Path.GetFileName(Path.GetDirectoryName(invocation.ProjectDirectory)) == "cycle-breakers")
343+
{
344+
Log.Write($"Skipping Wpf Cycle-Breaker project {invocation.ProjectFilePath}");
345+
continue;
346+
}
341347
Log.Write($"Indexing Project: {invocation.ProjectFilePath}");
342348
GenerateFromBuildLog.GenerateInvocation(
343349
invocation,

src/SourceBrowser/src/HtmlGenerator/Utilities/BinLogReader.cs

+38-15
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ private static CompilerInvocation TryGetInvocationFromTask(Microsoft.Build.Loggi
151151

152152
public static string TrimCompilerExeFromCommandLine(string commandLine, CompilerKind language)
153153
{
154-
155154
var stringsToTrim = new[]
156155
{
157156
"csc.exe ",
@@ -170,21 +169,8 @@ public static string TrimCompilerExeFromCommandLine(string commandLine, Compiler
170169
}
171170
}
172171

173-
var i1 = commandLine.IndexOf("dotnet.exe", StringComparison.Ordinal);
174-
var i2 = commandLine.IndexOf(" exec ", StringComparison.Ordinal);
175-
var i3 = commandLine.IndexOf("csc.dll", StringComparison.Ordinal);
176-
if (i3 == -1)
177-
{
178-
i3 = commandLine.IndexOf("vbc.dll", StringComparison.Ordinal);
179-
}
180-
181-
if (i1 != -1 &&
182-
i2 != -1 &&
183-
i3 != -1 &&
184-
i1 < i2 &&
185-
i2 < i3)
172+
string TrimHere(int i)
186173
{
187-
var i = i3 + "csc.dll".Length;
188174
if (commandLine[i] == '"')
189175
{
190176
i++;
@@ -198,6 +184,43 @@ public static string TrimCompilerExeFromCommandLine(string commandLine, Compiler
198184
return commandLine.Substring(i);
199185
}
200186

187+
{
188+
// Trim dotnet cli csc of vbc invocation
189+
190+
var i1 = commandLine.IndexOf("dotnet.exe", StringComparison.OrdinalIgnoreCase);
191+
var i2 = commandLine.IndexOf(" exec ", StringComparison.OrdinalIgnoreCase);
192+
var i3 = commandLine.IndexOf("csc.dll", StringComparison.OrdinalIgnoreCase);
193+
if (i3 == -1)
194+
{
195+
i3 = commandLine.IndexOf("vbc.dll", StringComparison.OrdinalIgnoreCase);
196+
}
197+
198+
if (i1 != -1 &&
199+
i2 != -1 &&
200+
i3 != -1 &&
201+
i1 < i2 &&
202+
i2 < i3)
203+
{
204+
return TrimHere(i3 + "csc.dll".Length);
205+
}
206+
}
207+
208+
{
209+
// Trim full path csc.exe or vbc.exe invocation
210+
211+
var i1 = commandLine.IndexOf("csc.exe", StringComparison.OrdinalIgnoreCase);
212+
if (i1 == -1)
213+
{
214+
i1 = commandLine.IndexOf("vbc.exe", StringComparison.OrdinalIgnoreCase);
215+
}
216+
217+
if (i1 != -1)
218+
{
219+
return TrimHere(i1 + "csc.exe".Length);
220+
}
221+
222+
}
223+
201224
return commandLine;
202225
}
203226

0 commit comments

Comments
 (0)