File tree Expand file tree Collapse file tree 3 files changed +29
-9
lines changed
ql/integration-tests/all-platforms/binlog Expand file tree Collapse file tree 3 files changed +29
-9
lines changed Original file line number Diff line number Diff line change @@ -154,8 +154,20 @@ static bool filter(CompilerCall compilerCall)
154
154
155
155
var compilerCall = compilationData . CompilerCall ;
156
156
var diagnosticName = compilerCall . GetDiagnosticName ( ) ;
157
- logger . LogInfo ( $ " Processing compilation { diagnosticName } ") ;
157
+ logger . LogInfo ( $ " Processing compilation { diagnosticName } at { compilerCall . ProjectDirectory } ") ;
158
158
var compilerArgs = compilerCall . GetArguments ( ) ;
159
+
160
+ var compilationIdentifierPath = string . Empty ;
161
+ try
162
+ {
163
+ compilationIdentifierPath = FileUtils . ConvertPathToSafeRelativePath (
164
+ Path . GetRelativePath ( Directory . GetCurrentDirectory ( ) , compilerCall . ProjectDirectory ) ) ;
165
+ }
166
+ catch ( ArgumentException exc )
167
+ {
168
+ logger . LogWarning ( $ " Failed to get relative path for { compilerCall . ProjectDirectory } from current working directory { Directory . GetCurrentDirectory ( ) } : { exc . Message } ") ;
169
+ }
170
+
159
171
var args = reader . ReadCommandLineArguments ( compilerCall ) ;
160
172
161
173
// Generated syntax trees are always added to the end of the list of syntax trees.
@@ -173,7 +185,7 @@ static bool filter(CompilerCall compilerCall)
173
185
TracingAnalyser . GetOutputName ( compilation , args ) ,
174
186
compilation ,
175
187
generatedSyntaxTrees ,
176
- diagnosticName ,
188
+ Path . Combine ( compilationIdentifierPath , diagnosticName ) ,
177
189
options ) ,
178
190
( ) => { } ) ;
179
191
Original file line number Diff line number Diff line change @@ -113,17 +113,24 @@ private static async Task DownloadFileAsync(string address, string filename)
113
113
public static void DownloadFile ( string address , string fileName ) =>
114
114
DownloadFileAsync ( address , fileName ) . GetAwaiter ( ) . GetResult ( ) ;
115
115
116
+ public static string ConvertPathToSafeRelativePath ( string path )
117
+ {
118
+ // Remove all leading path separators / or \
119
+ // For example, UNC paths have two leading \\
120
+ path = path . TrimStart ( Path . DirectorySeparatorChar , Path . AltDirectorySeparatorChar ) ;
121
+
122
+ if ( path . Length > 1 && path [ 1 ] == ':' )
123
+ path = path [ 0 ] + "_" + path . Substring ( 2 ) ;
124
+
125
+ return path ;
126
+ }
127
+
116
128
public static string NestPaths ( ILogger logger , string ? outerpath , string innerpath )
117
129
{
118
130
var nested = innerpath ;
119
131
if ( ! string . IsNullOrEmpty ( outerpath ) )
120
132
{
121
- // Remove all leading path separators / or \
122
- // For example, UNC paths have two leading \\
123
- innerpath = innerpath . TrimStart ( Path . DirectorySeparatorChar , Path . AltDirectorySeparatorChar ) ;
124
-
125
- if ( innerpath . Length > 1 && innerpath [ 1 ] == ':' )
126
- innerpath = innerpath [ 0 ] + "_" + innerpath . Substring ( 2 ) ;
133
+ innerpath = ConvertPathToSafeRelativePath ( innerpath ) ;
127
134
128
135
nested = Path . Combine ( outerpath , innerpath ) ;
129
136
}
Original file line number Diff line number Diff line change 6
6
| b/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs:0:0:0:0 | b/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs |
7
7
| b/obj/Debug/net8.0/test.AssemblyInfo.cs:0:0:0:0 | b/obj/Debug/net8.0/test.AssemblyInfo.cs |
8
8
| b/obj/Debug/net8.0/test.GlobalUsings.g.cs:0:0:0:0 | b/obj/Debug/net8.0/test.GlobalUsings.g.cs |
9
- | generated/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs:0:0:0:0 | generated/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs |
9
+ | generated/a/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs:0:0:0:0 | generated/a/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs |
10
+ | generated/b/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs:0:0:0:0 | generated/b/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs |
You can’t perform that action at this time.
0 commit comments