-
Notifications
You must be signed in to change notification settings - Fork 534
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
[XABT] Break BuildApk into individual tasks for each content type. #9612
Conversation
5a09742
to
e4eaea9
Compare
99aa87a
to
c9371c4
Compare
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.
Overall looks good. 👍
I don't think we are going to notice the overhead of adding more MSBuild tasks that split up the work. And it seems nice to split up all this code!
It's probably in the order of microseconds/nanoseconds difference.
// This method is used only for internal warnings which will never be shown to the end user, therefore there's | ||
// no need to use coded warnings. | ||
void LogSanitizerWarning (string message) |
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.
This is probably the original code, but what is a "internal warning"? This shows the warning to the user, how is it internal?
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.
Seems like this should just use LogDebugMessage()
?
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.
It is original code, however it looks like it is only used for "checked" builds which requires the internal property $(_AndroidCheckedBuild)
to be set. I updated the comment on it to mention this.
|
||
namespace Xamarin.Android.Tasks; | ||
|
||
public class CollectNativeFilesForArchive : AndroidTask |
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.
The other ones had a summary, might be worth putting a quick one here, too.
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.
👍
void LogSanitizerError (string message) | ||
{ | ||
Log.LogError (message); | ||
} |
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.
Similar to LogSanitizerWarning()
, seems like we'd be better off using throw
for some exception and get an automatic error code from our base MSBuild task class.
21d0b80
to
67a08df
Compare
* main: (25 commits) [CI] Break "Linux Tests" into 2 parallel jobs. (#9642) Fix `WorkloadDependencies.proj` build. (#9648) [CI] Set "WearOS Tests" parallelization to 2 agents. (#9639) [CI] Break "Package Tests" into 2 parallel jobs. (#9638) Bump to DevDiv/android-platform-support@3b4e16f1 (#9632) [NativeAOT] improve build logic, part 2 (#9631) Bump to dotnet/java-interop@2c06b3c2 (#9633) [NativeAOT] improve build logic, part 1 (#9614) [build] Generate `WorkloadDependencies.json` (#9613) [monodroid] remove `monodroid_get_log_categories()` (#9625) [monodroid] remove `_monodroid_get_identity_hash_code` (#9622) Bump to dotnet/java-interop@f800ea52 (#9607) [XABT] Break BuildApk into individual tasks for each content type. (#9612) [Mono.Android] Bind Android API-Baklava DP1 (#9594) [Xamarin.Android.Build.Tasks] Extract `BuildArchive` from `BuildApk` (#9556) [NativeAOT] MSBuild-related logic to get projects to build (#9583) [build] remove remnants of `OpenTK-1.0.dll` (#9610) [build] remove `Xamarin.Android.CSharp.targets` (#9609) [build] runtime "flavors" part 2 (#9598) Bump com.android.tools.build:manifest-merger to 31.7.3 (#9600) ...
* dev/grendel/use-libc++: (25 commits) [CI] Break "Linux Tests" into 2 parallel jobs. (#9642) Fix `WorkloadDependencies.proj` build. (#9648) [CI] Set "WearOS Tests" parallelization to 2 agents. (#9639) [CI] Break "Package Tests" into 2 parallel jobs. (#9638) Bump to DevDiv/android-platform-support@3b4e16f1 (#9632) [NativeAOT] improve build logic, part 2 (#9631) Bump to dotnet/java-interop@2c06b3c2 (#9633) [NativeAOT] improve build logic, part 1 (#9614) [build] Generate `WorkloadDependencies.json` (#9613) [monodroid] remove `monodroid_get_log_categories()` (#9625) [monodroid] remove `_monodroid_get_identity_hash_code` (#9622) Bump to dotnet/java-interop@f800ea52 (#9607) [XABT] Break BuildApk into individual tasks for each content type. (#9612) [Mono.Android] Bind Android API-Baklava DP1 (#9594) [Xamarin.Android.Build.Tasks] Extract `BuildArchive` from `BuildApk` (#9556) [NativeAOT] MSBuild-related logic to get projects to build (#9583) [build] remove remnants of `OpenTK-1.0.dll` (#9610) [build] remove `Xamarin.Android.CSharp.targets` (#9609) [build] runtime "flavors" part 2 (#9598) Bump com.android.tools.build:manifest-merger to 31.7.3 (#9600) ...
Refactor
BuildApk
into individual tasks for each content type. This promotes easier understanding of which pieces are dependent on each other and on which MSBuild properties.At this point, several of these tasks (like
CollectAssemblyFilesForArchive
) are still unconditionally creating and modifying files on every run. A future PR will separate these creations/modifications into separate targets that can be run incrementally.Theoretically, this PR is likely a slight performance regression due to having more tasks and a little bit of duplicated logic, however this should be more than offset by the ability to run tasks incrementally in the future. (The performance difference is small enough that it isn't really measurable because it is within the variability of our build time.)
main