src-d / ml-backlog

Issues belonging to source{d}'s Machine Learning team which cannot be related to a specific repository.
0 stars 3 forks source link

Port sourced.ml to bblfsh.v2 #8

Closed vmarkovtsev closed 5 years ago

vmarkovtsev commented 6 years ago

LA team have recently released Babelfish UAST v2, we need to port our projects.

bzz commented 6 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.

vmarkovtsev commented 6 years ago

@dennwc told me that it is possible to access v2 UAST using v1 API, the whole plan is based on that.

bzz commented 6 years ago

Got it, thank you for explaining! May be @dennwc could review the meeting notes then 😆 and clarify

vmarkovtsev commented 6 years ago

@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 and FunctionGroups.

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.

bzz commented 6 years ago

@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)

vmarkovtsev commented 5 years ago

Relates to #61

done by @zurk