Closed dennwc closed 6 years ago
@juanjux How can I verify that all necessary annotations are done correctly and nothing is missing?
Usually:
Create a list of all the internalType nodes. This usually can be found in the native AST documentation or module/lib.
Make sure that you cover all the possible internalTypes in the tests under fixtures/.
Once you've written the annotations, check that there aren't any nodes with Roles: Unannotated
in the *.uast
files (that role is automatically added by the SDK when a node doesn't have any annotation).
Also manually reviewing all the integration tests under fixtures/ is a heavy but necessary step (it helps if the fixtures are as simple as possible to test a language node).
I forgot to say, in case you didn't knew it, that you can generate the .native and .uast files with the command:
bblfsh-sdk-tools fixtures --language=php fixtures/*.php
(changing php for the language, of course)
This required that the version of the driver is installed. I usually write a .sh file that does this to test after doing changed in annotations:
make build &&\
docker exec -it bblfshd bblfshctl driver remove $LANG
docker exec -it bblfshd bblfshctl driver install $LANG &&\
docker-daemon:bblfsh/$LANG-driver:$DOCKER_IMAGE_TAG &&\
docker restart $BBLFSHD_CONTAINER_TAG &&\
sleep 3 &&\
bblfsh-sdk-tools fixtures --language=$LANG fixtures/*.$EXTENSION
This issue will track missing annotations before promoting Go driver to beta.
TODO: