enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.35k stars 323 forks source link

Automatic check of API backward compatibility #10507

Open Akirathan opened 2 months ago

Akirathan commented 2 months ago

For the planned release on 09/2024, we should contribute some kind of automatic checking for backward compatibility of API of our libraries. Once #10369 is merged, it should not be difficult.

10369 refines the BindingsMap.exportedSymbols field to contain all the resolved symbols in the exports.

The automated backward compatibility check could work as follows:

What is and what is not backward compatible is yet to be defined. For example, if to_json already resolves to multiple extension methods, having even more extension methods there is backward compatible. But removing an exported symbol is not backward compatible.

Inspiration from NetBeans:

Requirements

JaroslavTulach commented 2 months ago

Prepare a design for review, Pavel.

Akirathan commented 1 month ago

As part of library compilation, we already generate cached Suggestions. They are later sent to the IDE in JSON format. The sigfile can thus be a JSON-formatted .suggestions. Implementation-wise this should be the most straightforward approach. Moreover, for the backward compatibility, suggestions are what we should care about the most.

JaroslavTulach commented 1 month ago

The sigfile can thus be a JSON-formatted .suggestions.

CCing @4e6 and @hubertp