-
Notifications
You must be signed in to change notification settings - Fork 564
[Xamarin.Android.Build.Tasks] Use class-parse.exe out of MSBuild process #6551
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
Conversation
89c9866 to
a02297e
Compare
jonathanpeppers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you measure the build time before & after?
I think you could build a binding with -clp:performancesummary or -bl and just see how long this task takes.
| classPath.SaveXmlDescription (output); | ||
| var cmd = GetCommandLineBuilder (); | ||
|
|
||
| var responseFile = Path.Combine (Path.GetDirectoryName (OutputFile), "class-parse.rsp"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If class-parse.exe succeeds, should we delete this file immediately? Just leave it on disk if there is a non-zero exit code?
Otherwise, should something delete it when you run the Clean target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestions, added performance data and <FileWrites /> for response file.
a02297e to
7fdad64
Compare
jonathanpeppers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good if CI ends up green 👍
Context: dotnet/java-interop#499
There are potentially some conflicts with using
Xamarin.Android.Tools.Bytecodedirectly in the MSBuild process, as it now importsprotobuf-netwhich is a commonly used library.To ensure it isn't running in-process, switch our targets to shell out to
class-parse[.exe/.dll].Additionally add
class-parse.dll, etc. to the .NET 6 install pack. We are already shippingclass-parse.exe, etc. in the Classic installer even though it wasn't used, so no additional installer changes are needed there.As expected, moving this out-of-process is slightly slower, but still acceptable.
Additionally adds
java-resolution-report.logto<FileWrites />which was added in dotnet/java-interop#849.