Closed mmollaverdi closed 10 months ago
@qwwdfsad can I please clarify a few things
Not every removal or change is incompatible, and we would like to avoid semi-robust or obviously imprecise tools
I deliberately avoided calling the new option onlyFailOnIncompatibleChanges
or similar for this reason (it's called ignoreAdditions
). The intention is to increase the signal-to-noise ratio, so that API check doesn't fail for additions which to my understanding are always compatible? Also note that this option is defaulted to false.
Additions might be binary compatible, but after they are released, their ignored absence is not ...
There might be a misunderstanding here. The new ignoreAddition
option, when enabled, only changes the behaviour of apiCheck
so that it fails on delations and changes. It doesn't impact what apiDump
does (perhaps the option name needs to be explicit about being applicable only to apiCheck
?) Does that address your concerns?
My plan for using this new option is to have apiDump
run as part of the build AFTER apiCheck
. That'd mean
apiCheck
won't fail and apiDump
will run automatically updating the dump file.apiCheck
will fail, and apiDump
needs to be ran manually while reviewing the changes. An extension of this in future might be to dump deletions and changes into a separate file for an easier review.
In places where we're using this plug-in, we've ended up ignoring the apiCheck failures at times, due to many failures being due to new APIs being added, which are not breaking changes. This new configuration makes it so that apiCheck only fails if the existing API lines have been
change
d ordelete
d, indicating either new arguments being added to an exisitng function/method or an existing function/method being deleted. Both of these situations are potential breaking changes and what we want to fail the bulid for.