I removed the import paths example because we can no longer extract the import paths just using XPath. Now imports can have two forms (in Go at least):
A single uast:Identifier from which you can extract the name
A single uast:QualifiedIdentifier which has multiple uast:Identifier to extract the names from
The issue is you get something like ["bufio", "github.com", "src-d", "go-mysql-server"] instead of ["bufio", "github.com/src-d/go-mysql-server"] as we did before. The current output is useless for the user, so I thought it would be better to hide that from the docs until we implement something more convenient.
There are helpers to extract import paths from a node. We could implement something in gitbase to use those helpers. Perhaps some special @imports or something like this on uast_extract.
[x] I updated the documentation explaining the new behavior if any.
[x] I updated CHANGELOG.md file adding the new feature or bug fix.
[x] I updated go-mysql-server using make upgrade command if applicable.
[x] I added or updated examples if applicable.
[x] I checked that changes on schema are reflected into the documentation, if applicable.
Fixes #936
I removed the import paths example because we can no longer extract the import paths just using XPath. Now imports can have two forms (in Go at least):
uast:Identifier
from which you can extract the nameuast:QualifiedIdentifier
which has multipleuast:Identifier
to extract the names fromThe issue is you get something like
["bufio", "github.com", "src-d", "go-mysql-server"]
instead of["bufio", "github.com/src-d/go-mysql-server"]
as we did before. The current output is useless for the user, so I thought it would be better to hide that from the docs until we implement something more convenient.There are helpers to extract import paths from a node. We could implement something in gitbase to use those helpers. Perhaps some special
@imports
or something like this onuast_extract
.make upgrade
command if applicable.