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] JAVAC0000 error code #3445

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

jonathanpeppers
Copy link
Member

For tracking "deletebinobj" progress, we wanted to make sure we have
proper error codes for any failure that would be symptomatic of a
"deletebinobj" problem.

javac failing is one place that developers can't easily cause a
build failure without using AndroidJavaSource. If we get a
JAVAC0000, likely something went wrong with the Xamarin.Android
build system.

I also fixed up the test that was checking these error messages: it
was using StringAssertEx.Contains that calls Assert.Pass: some of
the assertions at the end of the test were skipped.

Copy link
Contributor

@brendanzagaeski brendanzagaeski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Seeing the change related to StringAssertEx.Contains(), I now know that I've written a couple tests that aren't checking all the expected assertions. I wonder if the behavior of StringAssertEx.Contains() to skip the rest of the test by calling Assert.Pass() is required for any tests right now. That seems like a tricky behavior. If no one beats me to it, I'll plan to create a PR to experiment with what happens to all the tests if StringAssertEx.Contains() and StringAssertEx.DoesNotContain() are modified to just return in instead of calling Assert.Pass().

For tracking "deletebinobj" progress, we wanted to make sure we have
proper error codes for any failure that would be symptomatic of a
"deletebinobj" problem.

`javac` failing is one place that developers can't easily cause a
build failure without using `AndroidJavaSource`. If we get a
`JAVAC0000`, likely something went wrong with the Xamarin.Android
build system.

I also fixed up the test that was checking these error messages: it
was using `StringAssertEx.Contains` that calls `Assert.Pass`: some of
the assertions at the end of the test were skipped.
@jonpryor jonpryor merged commit b37f7f8 into dotnet:master Aug 9, 2019
@jonathanpeppers jonathanpeppers deleted the javac-error-code branch August 9, 2019 21:51
@@ -78,6 +78,8 @@ at com.android.dx.command.Main.main(Main.java:106)

public string JavaMaximumHeapSize { get; set; }

public virtual string DefaultErrorCode => null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathanpeppers, @brendanzagaeski we have a bunch of tooling which derive from JavaToolTask and will probably us this right? We should probably put in a work item/issue to make sure they all have proper MSBuild Error codes.

jonathanpeppers added a commit that referenced this pull request Aug 16, 2019
For tracking "deletebinobj" progress, we wanted to make sure we have
proper error codes for any failure that would be symptomatic of a
"deletebinobj" problem.

`javac` failing is one place that developers can't easily cause a
build failure without using `@(AndroidJavaSource)`.  If we get a
`JAVAC0000`, likely something went wrong with the Xamarin.Android
build system.

I also fixed up the test that was checking these error messages: it
was using `StringAssertEx.Contains()` that calls `Assert.Pass()`:
some of the assertions at the end of the test were skipped.
@brendanzagaeski
Copy link
Contributor

A new preview version has now been published that includes a fix for this item.

Fix included in Xamarin.Android 10.0.0.40.

Fix included on Windows in Visual Studio 2019 version 16.3 Preview 3. To try the preview version that includes the fix, check for the latest updates in Visual Studio Preview.

Fix included on macOS in Visual Studio 2019 for Mac version 8.3 Preview 3. To try the preview version that includes the fix, check for the latest updates on the Preview updater channel.

@brendanzagaeski
Copy link
Contributor

Release status update

A new Release version has now been published that includes the fix for this item.

Fix included in Xamarin.Android 10.0.0.43

Fix included on Windows in Visual Studio 2019 version 16.3. To get the new version that includes the fix, check for the latest updates or install the latest version from https://visualstudio.microsoft.com/downloads/.

Fix included on macOS in Visual Studio 2019 for Mac version 8.3. To get the new version that includes the fix, check for the latest updates on the Stable updater channel.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 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.

4 participants