-
Notifications
You must be signed in to change notification settings - Fork 553
[XABT] Make assembly compression incremental. #9704
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
d217bf1
to
679a43e
Compare
679a43e
to
c097ec2
Compare
case CompressionResult.EncodingFailed: | ||
log.LogMessage ($"Failed to compress {sourceAssembly}"); | ||
break; | ||
case CompressionResult.InputTooBig: |
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.
Reviewing the full code file this does not seem to be enabled anymore? The code which raised this issue is commented out.
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.
I don't know why that error condition is disabled in the existing code, but I think it's fine to ensure we log it properly if it ever gets reenabled.
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 this test be updated:
android/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs
Lines 37 to 40 in 18af3ac
Assert.IsTrue (b.Build (proj), "third build failed"); | |
Assert.IsFalse ( | |
b.Output.IsTargetSkipped ("_Sign"), | |
"the _Sign target should run"); |
To check:
b.Output.AssertTargetIsPartiallyBuilt ("_CompressAssemblies");
--> | ||
<Target Name="_CompressAssemblies" | ||
DependsOnTargets="_CollectAssembliesToCompress" | ||
Inputs="@(_AssembliesToCompress);@(_AndroidMSBuildAllProjects)" |
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.
You might also add:
Inputs="@(_AssembliesToCompress);@(_AndroidMSBuildAllProjects)" | |
Inputs="@(_AssembliesToCompress);@(_AndroidMSBuildAllProjects);$(_AndroidBuildPropertiesCache)" |
The build.props
file has been the thing used to rerun all targets no matter what.
Updated with feedback, I think this is ready. |
* main: [XABT] Make assembly compression incremental. (#9704)
If using
$(AndroidEnableAssemblyCompression)
today, we do not compress assemblies incrementally. That is, we always compress every assembly even if they haven't changed since the previous build.Update the
CompressAssemblies
task to check if the input is newer than the output, and skip recompressing if the input has not changed.This is most visible with the following test case:
CompressAssemblies
tasks)ChangeCSharpJLO
should be similarly reduced, however something earlier in the build process is causingMono.Android.dll
to get touched so it is getting recompressed. We'll leave that as an investigation for another day.