bblfsh / sdk

Babelfish driver SDK
GNU General Public License v3.0
23 stars 27 forks source link

Language aliases and languages protocol v2 #400

Closed dennwc closed 5 years ago

dennwc commented 5 years ago

This change defines a v2 endpoint for application version and the list of supported languages. It will finally allow moving https://github.com/bblfsh/bblfshd/pull/210 forward.

As a part of the change, define language aliases field in the driver manifest. This adds SDK support for https://github.com/bblfsh/bblfshd/issues/263.

The change is backward-compatible in the sense that it won't disable v1 language API in drivers, allowing to use them with older bblfshd versions.

But it also includes one breaking change for drivers. The internal driver interface has changed, thus drivers that declare a custom implementation would require few small changes. Note, however, that this is only true for drivers with custom implementations, and for now it only includes Go that is compiled directly into the driver server (as opposed to a separate binary with stdin/stdout pipes). Every other driver uses SDK to set up the server, thus requires no changes.

Regarding the language protocol itself, it only defines a few commonly used fields from the driver manifest, instead of all of them as defined by SDK. This can be changed later to add more fields to the protocol as needed.

Signed-off-by: Denys Smirnov denys@sourced.tech

dennwc commented 5 years ago

Addressed most of the feedback, waiting for resolution on the rest. And ready for another round.

dennwc commented 5 years ago

OK, it looks like every bit of the feedback is addressed, so we should be good to merge it.

@creachadair Please let me know if I missed something.