Closed vmarkovtsev closed 5 years ago
Sorry for butting in, but I believe we discussed that on the last TL meeting and the consensus was that teams would need to wait until LA work on libuastv2 is finished, so that new versions of client libraries with UASTv2 support are released.
AFAIK right now it's only a golang client that supports it, so i.e Apps team is migrating bblfsh/web.
@dennwc told me that it is possible to access v2 UAST using v1 API, the whole plan is based on that.
Got it, thank you for explaining! May be @dennwc could review the meeting notes then 😆 and clarify
@smacker wrote me in DM that @dennwc wrote:
There are multiple problems with releasing v2 right now.
The first problem is that v2 drivers can only emit either semantic or native UAST via v1 protocol (no "just annotations" mode). Thus, if you had the code that relies on
Function
roles, for example, the code will break and there is no way to fix it except to migrate to v2 andFunctionGroup
s.The only client that can bypass this restriction is Go, since it can send a v2 request and decode the new UAST format and downdrade the UAST back to v1. But, it cannot filter these results because the libuast v2 is not yet released.
The second problem is that even assuming the semantic v2 is okay and we want to force the migration, libuast v1 cannot express namespaces correctly, so an XPath query for
uast:Identifier
should be written as//Identifier
. But once the libuast v2 is released, the query will require the type with a namespace (//uast:Identifier
) that will break clients (again).Thus, if it's possible, we should wait for at least a week before releasing v2 drivers to public.
So we should wait indeed. Since we want to release something useful in Q3 this means that we will not migrate in Q3 then.
@smacker wrote me in DM that @dennwc wrote
👍 thank you for sharing
BTW, I belive this has been already changed by @dennwc 😆
downdrade the UAST back to v1
AFAIK this is done in go-client now by default (IDK about other clients though)
Relates to #61
done by @zurk
LA team have recently released Babelfish UAST v2, we need to port our projects.