Add --make-repro-path option to crossgen2#57543
Conversation
- This is used to create repro packages for customer discovered issues with CrossGen2 - Customers will use this by setting the PublishCrossGen2ExtraArgs property to something like `--make-repro-path:c:\repro\crossgen2repro` - Then the build will run, and produce zip files in the specified directory, one for each crossgen2 run that occurs during that build. - Hopefully, then it is straightforward to package the failure up and send it in. In addition, this tech can be used to transfer a full set of repro details from a Unix to Windows machine for easier debugging.
|
@tommcdon Tom, while I was debugging one of our first in the wild crossgen2 issues, it was suggested by @AndyAyersMS to build the ability to package up the inputs to crossgen2 as an zip package. I know you have some experience with these things. What do you think of this approach? |
|
I assume #57535 was done using this command? Cool! |
trylek
left a comment
There was a problem hiding this comment.
Looks great, thanks for adding this tool!
AntonLapounov
left a comment
There was a problem hiding this comment.
Looks great! I guess we place each input assembly in a separate directory to allow duplicate file names. As an alternative, we could create additional directories only in case of file name duplication.
| } | ||
| else | ||
| { | ||
| rspFile.Add($"{ConvertFromInputPathToReproPackagePath((string)parameter.Value.ToString())}"); |
There was a problem hiding this comment.
Nit: I guess casting to string is a no-op here.
| string zipFileName = ((uint)hashCodeOfArgs.ToHashCode()).ToString(); | ||
|
|
||
| if (OutputFilePath != null) | ||
| zipFileName = zipFileName + "_" + Path.GetFileName(OutputFilePath); |
There was a problem hiding this comment.
Nit: If there are multiple repro files in the same directory, it might be easier to search through them if we put OutputFilePath at the beginning.
PublishCrossGen2ExtraArgsproperty to something like--make-repro-path:c:\repro\crossgen2reproIn addition, this tech can be used to transfer a full set of repro details from a Unix to Windows machine for easier debugging.