Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] fix potential AsyncTask.Log calls (#4187)
Changes: xamarin/monodroid@78d5658...017b361 * xamarin/monodroid@017b3618b: [tools/msbuild] fix potential AsyncTask.Log calls (#1069) We have had a continuing concern of accidentally calling methods on `AsyncTask.Log` from a background thread. If it happens, this can cause a hang inside Visual Studio on Windows. I finally had the idea of creating a build error if we inadvertently do this: [Obsolete("You should not use the 'Log' property directly for AsyncTask. Use the 'Log*' methods instead.", error: true)] public new TaskLoggingHelper Log { get; } This uncovered 26 build errors! Some were actually on the main thread and completely OK, but several were not OK. In most of the places, I could simply change `Log.LogDebugMessage()` to `LogDebugMessage()`. However a few of the more troublesome places: * `ManifestDocument` required a `TaskLoggingHelper` for its ctor. I moved this to only the methods that need it. * `NdkUtils` and `NdkUtilsOld` I used `Action<string>` and `Action<string, string>` callbacks instead. * The `<Aot/>` task had an empty `ValidateAotConfiguration()` method I removed. Going forward, it should be a lot harder for us to introduce a hang by using `AsyncTask.Log`.
- Loading branch information
1 parent
9f85f94
commit 9fca138
Showing
14 changed files
with
123 additions
and
106 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
xamarin/monodroid:master@78d565884f7dd2cf76e748125485f7ed0e03eec4 | ||
xamarin/monodroid:master@017b3618bd33689f766e82b5fd640360e4c19919 | ||
mono/mono:2019-12@2edccc52a78d90fea7bcbd37844164663e712397 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.