As mentioned in commit
789517f8, I'm trying to compare inter-API level
differences in Mono.Android.dll, and want to reduce as much
"meaningless noise" as possible -- changes which don't meaningfully
break API or ABI.
Among those "meaningless" changes are the addition of property setters
to properties. Adding a setter doesn't break API or ABI.
Add a `mono-api-html --ignore-changes-property-setters` option.
--ignore-changes-property-setters:
Ignore the addition of property setters.
If a source property contains a getter and the target property
contains both a getter and a setter, do not flag this as a
change.
public static bool IgnoreParameterNameChanges { get; set; }
public static bool IgnoreVirtualChanges { get; set; }
+ public static bool IgnoreAddedPropertySetters { get; set; }
public static bool Lax;
}
{ "ignore-changes-parameter-names", "Ignore changes to parameter names for identically prototyped methods.",
v => State.IgnoreParameterNameChanges = v != null
},
+ { "ignore-changes-property-setters", "Ignore adding setters to properties.",
+ v => State.IgnoreAddedPropertySetters = v != null
+ },
{ "ignore-changes-virtual", "Ignore changing non-`virtual` to `virtual` or adding `override`.",
v => State.IgnoreVirtualChanges = v != null
},
string sourceDescription = GetDescription (source);
string targetDescription = GetDescription (target);
+ return CheckVirtualChanges (sourceDescription, targetDescription) ||
+ (State.IgnoreAddedPropertySetters &&
+ CheckVirtualChanges (sourceDescription, targetDescription.Replace (" set; ", " ")));
+ }
+
+ static bool CheckVirtualChanges (string sourceDescription, string targetDescription)
+ {
return (sourceDescription == targetDescription) ||
// *adding* virtual or override to target is acceptable; *removing* them is NOT
(State.IgnoreVirtualChanges &&