Open pgev opened 5 years ago
A proposed solution:
The external facing contracts are the ones that we include in npm package. This list is defined in ./npm_package/contract_names.json file.
./tools/generate_external_contract_abis.sh --output-dir <output-dir-path>
./tools/generate_external_contract_abis.sh --output-dir ./test/data/external_contract_abis
for the latest published release and commit the generated ABIs into develop.
Write a node script ./tools/ensure_backward_compatibility.js that generates ABIs of external contracts, and compares against committed ones (./test/data/external_contract_abis). It's allowed to extend committed external contracts' interfaces (addition), however, deletion and modification should fail the script.
Enhance npm_package/test/run_npm_package_test.sh and ./npm_package/make_package.js scripts to run ./tools/ensure_backward_compatibility.js and fail accordingly.
As a release manager I want release's acceptance tests to fail in case of breaking changes in contracts' interfaces so that I can block the release.