Skip to content
This repository was archived by the owner on Mar 8, 2021. It is now read-only.

Commit e353872

Browse files
committed
Fix member removal check
Context: dotnet/android#771 (comment) Checking for `>Removed` is insufficient for checking for API compatibility breakage, as sometimes `mono-api-html` will emit `>Modified`. For example, [xamarin-android PR #771][xa771] changes the type of the `Android.App.NotificationChannel.LockscreenVisibility` property from `int` to `NotificationVisibility`. This was expected to result in a build failure, due to API breakage. [xa771]: dotnet/android#771 (comment) It didn't. Update the member removal check to instead check for the existence of the `data-is-breaking` tag. This will hopefully improve compatibility checks in the future.
1 parent ed8d914 commit e353872

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ check: check-inter-api-level
9292
$(call BUILD_API_INFO,temp,$(XA_FRAMEWORK_DIR))
9393
failed=0 ; \
9494
for file in $(CORE_ASSEMBLIES) $(TFV_ASSEMBLIES) ; do \
95-
if $(MONO_API_HTML) $(REFERENCE_DIR)/$$file.xml temp/$$file.xml --ignore-changes-parameter-names --ignore-nonbreaking | grep '>Removed' > /dev/null 2>&1 ; then \
95+
if $(MONO_API_HTML) $(REFERENCE_DIR)/$$file.xml temp/$$file.xml --ignore-changes-parameter-names --ignore-nonbreaking | grep '\<data-is-breaking\>' > /dev/null 2>&1 ; then \
9696
echo "ABI BREAK IN: $$file.dll" ; \
9797
$(MONO_API_HTML) $(REFERENCE_DIR)/$$file.xml temp/$$file.xml --ignore-changes-parameter-names --ignore-nonbreaking; \
9898
failed=1; \
@@ -131,7 +131,7 @@ check-inter-api-level: -create-inter-api-infos
131131
command="$(MONO_API_HTML) \"$$prev\" \"$$cur\" --ignore-changes-parameter-names --ignore-changes-virtual --ignore-changes-property-setters --ignore-nonbreaking $$extra"; \
132132
echo $$command; \
133133
eval $$command > "$$out" 2>&1; \
134-
if grep '>Removed' $$out > /dev/null 2>&1 ; then \
134+
if grep '\<data-is-breaking\>' $$out > /dev/null 2>&1 ; then \
135135
echo "<h1>### API BREAK BETWEEN $${_frameworks[$$prev_framework]} and $${_frameworks[$$i]}</h1>" ; \
136136
cat $$out; \
137137
failed=1; \

0 commit comments

Comments
 (0)