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] Check a jar has .class files in it. #2882

Merged
merged 4 commits into from
Mar 29, 2019

Conversation

dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Mar 26, 2019

We have found an issue with our fastdev support when
it comes across a .jar file which does NOT contain
any .class files.

As part of our fastdev system we convert all the
.jar files we need to .dex files so they
can be fast deployed.

If we come across a .jar file which does not
contain any .class files dx exists with the
following error

no classes!

This causes the build to fail. So what we need to do
is check that a .jar has .class files in it.
This commit also reworks some code to not use Linq
in favour of a standard foreach loop.

@dellis1972 dellis1972 marked this pull request as ready for review March 27, 2019 14:06
@dellis1972
Copy link
Contributor Author

Failed tests seem to be Network related and nuget parallel runs related :(

@dellis1972 dellis1972 requested a review from jonpryor March 27, 2019 16:41
@jonpryor
Copy link
Member

@monojenkins build

We have found an issue with our fastdev support when
it comes across a `.jar` file which does NOT contain
any `.class` files.

As part of our fastdev system we convert all the
`.jar` files we need to `.dex` files so they
can be fast deployed.

If we come across a `.jar` file which does not
contain any `.class` files `dx` exists with the
following error

	no classes!

This causes the build to fail. So what we need to do
is check that a `.jar` has `.class` files in it.
This commit also reworks some code to not use Linq
in favour of a standard foreach loop.
@dellis1972
Copy link
Contributor Author

Something really weird going on with the Checks summary page. It seems to be listing tests which didn't actually fail. Downloading the logs the following tests seem to be failing, not entirely sure why.

2019-03-28T20:38:01.6624624Z   1) Failed : Xamarin.Android.Build.Tests.BuildTest.BuildAotApplication("armeabi-v7a",True,True)
2019-03-28T20:38:01.6626307Z     Build should have succeeded.
2019-03-28T20:38:01.6626827Z     Expected: True
2019-03-28T20:38:01.6627092Z     But was:  False
2019-03-28T20:38:01.6627334Z   at Xamarin.Android.Build.Tests.BuildTest.BuildAotApplication(String supportedAbis, Boolean enableLLVM, Boolean expectedResult) in E:\A\_work\1366\s\src\Xamarin.Android.Build.Tasks\Tests\Xamarin.Android.Build.Tests\BuildTest.cs:line 701
2019-03-28T20:38:01.6627945Z   
2019-03-28T20:38:01.6628477Z   2) Failed : Xamarin.Android.Build.Tests.BuildTest.BuildAotApplication("arm64-v8a",True,True)
2019-03-28T20:38:01.6628831Z     Build should have succeeded.
2019-03-28T20:38:01.6629222Z     Expected: True
2019-03-28T20:38:01.6629442Z     But was:  False
2019-03-28T20:38:01.6629715Z   at Xamarin.Android.Build.Tests.BuildTest.BuildAotApplication(String supportedAbis, Boolean enableLLVM, Boolean expectedResult) in E:\A\_work\1366\s\src\Xamarin.Android.Build.Tasks\Tests\Xamarin.Android.Build.Tests\BuildTest.cs:line 701
2019-03-28T20:38:01.6630162Z   
2019-03-28T20:38:01.6630373Z   3) Failed : Xamarin.Android.Build.Tests.BuildTest.BuildAotApplicationAndBundle("armeabi-v7a",True,True)
2019-03-28T20:38:01.6630587Z     Build should have succeeded.
2019-03-28T20:38:01.6630839Z     Expected: True
2019-03-28T20:38:01.6631105Z     But was:  False
2019-03-28T20:38:01.6631384Z   at Xamarin.Android.Build.Tests.BuildTest.BuildAotApplicationAndBundle(String supportedAbis, Boolean enableLLVM, Boolean expectedResult) in E:\A\_work\1366\s\src\Xamarin.Android.Build.Tasks\Tests\Xamarin.Android.Build.Tests\BuildTest.cs:line 761
2019-03-28T20:38:01.6631752Z   
2019-03-28T20:38:01.6632173Z   4) Failed : Xamarin.Android.Build.Tests.BuildTest.BuildAotApplicationAndBundle("arm64-v8a",True,True)
2019-03-28T20:38:01.6632538Z     Build should have succeeded.
2019-03-28T20:38:01.6632871Z     Expected: True
2019-03-28T20:38:01.6633184Z     But was:  False
2019-03-28T20:38:01.6633699Z   at Xamarin.Android.Build.Tests.BuildTest.BuildAotApplicationAndBundle(String supportedAbis, Boolean enableLLVM, Boolean expectedResult) in E:\A\_work\1366\s\src\Xamarin.Android.Build.Tasks\Tests\Xamarin.Android.Build.Tests\BuildTest.cs:line 761

@dellis1972
Copy link
Contributor Author

For some reason the Checks summary is still showing errors from earlier builds :)
If you want to see the actual failures got to https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=2539833&view=ms.vss-test-web.test-result-details.

I believe those 4 AOT failures are known at this time.

@jonpryor jonpryor merged commit e6326dc into dotnet:master Mar 29, 2019
jonpryor pushed a commit that referenced this pull request Apr 3, 2019
)

We have found an issue with our fastdev support when it comes across
a `.jar` file which does NOT contain any `.class` files.

As part of our fastdev system we convert all the `.jar` files we need
to `.dex` files so they can be fast deployed.

If we come across a `.jar` file which does not contain any `.class`
files, `dx` exits with the following error:

	no classes!

This causes the build to fail.  What we need to do is check that a
`.jar` has `.class` files in it.

This commit also reworks some code to not use Linq in favor of a
standard foreach loop.
SIDOVSKY added a commit to SIDOVSKY/Hyperion-Xamarin.Android that referenced this pull request Nov 14, 2020
Changes which lead to ignoring hyperion-known-services-xamarin:
dotnet/android#2882
dotnet/android#4385

In hyperion-known-services-xaxmarin:
* renamed .jar file to classes.jar
* added dummy .class file

Xamarin.Android still can't merge java service provider configuration files (META-INF\services\)
@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 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.

3 participants