Skip to content

Commit

Permalink
Bump to xamarin-android-api-compatibility/master/0e1889b0 (#699)
Browse files Browse the repository at this point in the history
Context: #662

The intention of `xamarin-android`'s
[api-compatibility](tests/api-compatibility) test is to ensure that
API compatibility isn't broken by a commit. The `api-compatibility`
test works by using the `make check` target in the
[`xamarin-android-api-compatibility` repo][xa-compat].

Unfortunately, it was broken: API breakage which *should* be reported
*isn't* being reported.

The cause of the failure was the intermix of three things:

 1. The `make check` target redirects `mono-api-info` standard output
    to a file, a file which *must* be valid XML in order for the
    subsequent `mono-api-html` invocation to succeed

 2. When `mono-api-info`
    [encounters an error loading an assembly][assembly-error], the
    error message is written to standard output.

 3. For currently unknown reasons, the xamarin-android build system
    doesn't always copy debug symbols when it copies assemblies.

The result of this interplay is that when processing
`Mono.Android.dll`, the resulting `Mono.Android.xml` file is not
valid XML:

	Symbol file …/xamarin-android/bin/BuildDebug/Xamarin.Android.Cecil.pdb doesn't match image …/xamarin-android/bin/BuildDebug/Xamarin.Android.Cecil.dll
	<?xml version="1.0" encoding="utf-8"?>
	…

(I don't immediately know why `Xamarin.Android.Cecil.dll` is being
loaded while processing `Mono.Android.dll`. I just know that the
resulting intermediate `Mono.Android.xml` for API compatibility
checking starts with the above output.)

While all three factors can -- and should! -- be individually fixed,
it's easiest at this point in time to fix the first factor: instead
of redirecting `mono-api-info` standard output to `Mono.Android.xml`,
instead use `mono-api-info -o FILENAME`. This ensures that the
resulting file that we care about will contain valid XML.

Bump to xamarin-android-api-compatibility/master/0e1889b0 so that the
`mono-api-info` invocation uses `mono-api-info -o FILENAME`.

[xa-compat]: https://github.com/xamarin/xamarin-android-api-compatibility
[assembly-error]: https://github.com/mono/mono/blob/a715c0daee65db97e2df1080ef42dc99436a3f52/mcs/tools/corcompare/mono-api-info.cs#L205
  • Loading branch information
atsushieno authored and jonpryor committed Jul 19, 2017
1 parent df79d3d commit acd80a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion external/xamarin-android-api-compatibility

0 comments on commit acd80a0

Please sign in to comment.