[XABT] Make assembly compression incremental. - #9704
Merged
Conversation
jpobst
force-pushed
the
dev/jpobst/incremental-compression
branch
from
January 27, 2025 22:48
d217bf1 to
679a43e
Compare
jpobst
force-pushed
the
dev/jpobst/incremental-compression
branch
from
January 28, 2025 18:01
679a43e to
c097ec2
Compare
jpobst
marked this pull request as ready for review
January 28, 2025 22:50
grendello
approved these changes
Jan 29, 2025
dellis1972
reviewed
Jan 29, 2025
| case CompressionResult.EncodingFailed: | ||
| log.LogMessage ($"Failed to compress {sourceAssembly}"); | ||
| break; | ||
| case CompressionResult.InputTooBig: |
Contributor
There was a problem hiding this comment.
Reviewing the full code file this does not seem to be enabled anymore? The code which raised this issue is commented out.
Contributor
Author
There was a problem hiding this comment.
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.
jonathanpeppers
left a comment
Member
There was a problem hiding this comment.
Could this test be updated:
To check:
b.Output.AssertTargetIsPartiallyBuilt ("_CompressAssemblies"); | --> | ||
| <Target Name="_CompressAssemblies" | ||
| DependsOnTargets="_CollectAssembliesToCompress" | ||
| Inputs="@(_AssembliesToCompress);@(_AndroidMSBuildAllProjects)" |
Member
There was a problem hiding this comment.
You might also add:
Suggested change
| Inputs="@(_AssembliesToCompress);@(_AndroidMSBuildAllProjects)" | |
| Inputs="@(_AssembliesToCompress);@(_AndroidMSBuildAllProjects);$(_AndroidBuildPropertiesCache)" |
The build.props file has been the thing used to rerun all targets no matter what.
Contributor
Author
|
Updated with feedback, I think this is ready. |
jonathanpeppers
approved these changes
Feb 4, 2025
grendello
added a commit
that referenced
this pull request
Feb 5, 2025
* main: [XABT] Make assembly compression incremental. (#9704)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
CompressAssembliestask 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:
CompressAssembliestasks)ChangeCSharpJLOshould be similarly reduced, however something earlier in the build process is causingMono.Android.dllto get touched so it is getting recompressed. We'll leave that as an investigation for another day.