Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --make-repro-path option to crossgen2 #57543

Merged
merged 1 commit into from
Aug 17, 2021

Conversation

davidwrighton
Copy link
Member

@davidwrighton davidwrighton commented Aug 17, 2021

  • 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.

- 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.
@davidwrighton
Copy link
Member Author

@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?

@EgorBo
Copy link
Member

EgorBo commented Aug 17, 2021

I assume #57535 was done using this command? Cool!

Copy link
Member

@trylek trylek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for adding this tool!

Copy link
Member

@AntonLapounov AntonLapounov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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())}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 17, 2021
@davidwrighton davidwrighton deleted the build_repro_package branch April 13, 2023 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants