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

[Xamarin.Android.Build.Tasks] more logging in <BuildApk/> #3115

Merged
merged 1 commit into from
May 24, 2019

Conversation

jonathanpeppers
Copy link
Member

Context: https://github.com/xamarin/xamarin-android/blob/373c6ed08bef01274bd4abfe330d50327052e067/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs#L195
Context: https://github.com/xamarin/xamarin-android/blob/373c6ed08bef01274bd4abfe330d50327052e067/src/Xamarin.Android.Build.Tasks/Utilities/Files.cs#L271

Testing locally, code changes were not making it onto my device...

Reviewing the build logs:

  1. _CopyPackage was skipped
  2. CopyIfZipChanged was returning false
  3. The CRC values of each item in the APK was reporting 0???

I decided to nuke my build tree with git clean -dxf and rebuild.
Then it worked fine... I must have had an outdated libzip.dll that
was broken?

This makes me nervous, but there is something to improve here.

There was not really sufficient logging for me to understand what
happened without making code changes to the MSBuild tasks. So I think
it is a good idea to log the result of CopyIfZipChanged, if we need
to review what is happening from customer build logs in the future.

I also removed a commented out Console.WriteLine().

Context: https://github.com/xamarin/xamarin-android/blob/373c6ed08bef01274bd4abfe330d50327052e067/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs#L195
Context: https://github.com/xamarin/xamarin-android/blob/373c6ed08bef01274bd4abfe330d50327052e067/src/Xamarin.Android.Build.Tasks/Utilities/Files.cs#L271

Testing locally, code changes were not making it onto my device...

Reviewing the build logs:

1. `_CopyPackage` was skipped
2. `CopyIfZipChanged` was returning `false`
3. The `CRC` values of each item in the APK was reporting `0`???

I decided to nuke my build tree with `git clean -dxf` and rebuild.
Then it worked fine... I must have had an outdated `libzip.dll` that
was broken?

This makes me nervous, but there is something to improve here.

There was not really sufficient logging for me to understand what
happened without making code changes to the MSBuild tasks. So I think
it is a good idea to log the result of `CopyIfZipChanged`, if we need
to review what is happening from customer build logs in the future.

I also refactored the code in `<BuildApk/>` slightly, and I removed a
commented out `Console.WriteLine()`.
@jonpryor
Copy link
Member

1,113 failures from OutOfMemoryExceptions is a tad unexpected, and doesn't look remotely related to what this PR could possibly do.

Let's rebuild anyway, cross our fingers 🤞, and hope we don't get rando failures next time.

@jonpryor
Copy link
Member

@jonpryor jonpryor merged commit df59aa8 into dotnet:master May 24, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants