-
Notifications
You must be signed in to change notification settings - Fork 528
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] Fix message for missing Platform error XA5207 #1152
Merged
Conversation
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
…XA5207 Fixes dotnet#1136 Commit 7f45a6d reworked the GetJavaPlatformJar Task (and others) to handle a NRE exception. However the error logging code in MonoAndroidHelper.cs was not formatted correctly. As a result the XA5207 error would be logged without any message. This commit fixes up the LogError call to make sure the error has a decent message. It also adds a unit test so that we can catch this issue if it regresses in the future.
dellis1972
added
the
Area: xamarin-android Build
Issues building the xamarin-android repo *itself*.
label
Jan 3, 2018
jonpryor
reviewed
Jan 4, 2018
@@ -543,7 +543,7 @@ public static string TryGetAndroidJarPath (TaskLoggingHelper log, string platfor | |||
var platformPath = MonoAndroidHelper.AndroidSdk.TryGetPlatformDirectoryFromApiLevel (platform, MonoAndroidHelper.SupportedVersions); | |||
if (platformPath == null) { | |||
var expectedPath = MonoAndroidHelper.AndroidSdk.GetPlatformDirectoryFromId (platform); | |||
log.LogError ("XA5207", "Could not find android.jar for API Level {0}. " + | |||
log.LogError (null, "XA5207", null, null, 0, 0, 0, 0, "Could not find android.jar for API Level {0}. " + |
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.
Instead of using the 9 parameter LogError()
method, perhaps we should instead use our log.LogCodedError()
extension method?
jonpryor
pushed a commit
that referenced
this pull request
Jan 4, 2018
…XA5207 (#1152) Fixes: #1136 Commit 7f45a6d reworked the `<GetJavaPlatformJar/>` Task (and others) to handle a `NullReferenceException`. However the error logging code in `MonoAndroidHelper.cs` was not formatted correctly. As a result the XA5207 error would be logged without any message. This commit fixes up the `LogError()` call to make sure the error has a decent message. It also adds a unit test so that we can catch this issue if it regresses in the future.
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Jan 22, 2021
Fixes: xamarin/monodroid#1147 Fixes: xamarin/monodroid#1150 Fixes: xamarin/monodroid#1123 Changes: xamarin/monodroid@3586135...06e80c5 * xamarin/monodroid@06e80c567: [tools/msbuild] FastDeploy is not ignoring warnings in output (dotnet#1151) (dotnet#1152) * xamarin/monodroid@1f08686de: [tools/msbuild] <FastDeploy/> Length cannot be less than zero (dotnet#1148)
jonpryor
added a commit
that referenced
this pull request
Jan 22, 2021
Fixes: xamarin/monodroid#1123 Fixes: xamarin/monodroid#1147 Fixes: xamarin/monodroid#1150 Changes: xamarin/monodroid@3586135...06e80c5 * xamarin/monodroid@06e80c567: [tools/msbuild] FastDeploy is not ignoring warnings in output (#1151) (#1152) * xamarin/monodroid@1f08686de: [tools/msbuild] <FastDeploy/> Length cannot be less than zero (#1148)
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.
Fixes #1136
Commit 7f45a6d reworked the GetJavaPlatformJar Task (and others)
to handle a NRE exception. However the error logging code in
MonoAndroidHelper.cs was not formatted correctly. As a result
the XA5207 error would be logged without any message.
This commit fixes up the LogError call to make sure the error
has a decent message. It also adds a unit test so that we can
catch this issue if it regresses in the future.