-
Notifications
You must be signed in to change notification settings - Fork 16
QUALIFIED_IDENTIFIER is not SIMPLE_IDENTIFIER and duplication of CALL_CALLEE role #51
Comments
In principle |
Python doesn't make a distinction on the AST level from method calls and module calls (since modules are really object instances), so The definition of // CallCallee is the callable being called. It might be the name of a
// function or procedure, it might be a method, it might a simple name
// or qualified with a namespace.
|
As I can understand:
Please, correct me if I am wrong. |
|
@zurk https://godoc.org/github.com/bblfsh/sdk/uast#Role is the reference documentation for roles |
@zork my current task involves working with the annotations so I'll try to shoehorn this too on the next release of the driver (ETA: today or monday). |
All problems reported should be fixed by #54 |
Fix is in version v0.4.5, thanks for the good report! |
It seems not to work. What I do to update docker: $ docker rmi -f bblfsh/server
Untagged: bblfsh/server:latest
Untagged: bblfsh/server@sha256:995edbd4bc3f1304059670892322492d37c625ce99d749a9bd6eba60df8d3fc0
Deleted: sha256:d1d3218cfb85213b8ab865b93b2eb996e21b22b8de3081e1c8dd3d5dd8a9645d
Deleted: sha256:52960978090142da160beb362760fd3b735c6b4d65b6383993ef17d8b6df4a62
Deleted: sha256:5532368a31059f5aabdfa6834c46364d9d16fe3c985f857fb26f17a4d05cc912
Deleted: sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0
$ docker rmi -f bblfsh/server
Error response from daemon: No such image: bblfsh/server:latest then run it. docker run --privileged -p 9432:9432 --name bblfsh bblfsh/server bblfsh logs:
And the output of example in the first msg is the same:
May be it is the same driver image but I have no idea how to check it. |
@zurk could you upload the python file you're parsing somewhere? |
@abeaumont It is in the first message. from matplotlib import pyplot as plt
plt.figure() |
@zurk oh, you're right, I missed that. Thanks! |
@zurk this works for me to workaround the BBLFSH_DRIVER_IMAGES="python=docker://bblfsh/python-driver:v0.4.5" docker run -e BBLFSH_DRIVER_IMAGES --privileged -p 9432:9432 --name bblfsh bblfsh/server |
Yes, it works. Babelfish overrides image for python:
Thank you @juanjux, @abeaumont. |
No need for the workaround anymore: bblfsh/sdk#159 |
I found that
QUALIFIED_IDENTIFIER
is notSIMPLE_IDENTIFIER
, but @vmarkovtsev say that it is supposed to be.Also, I found duplication of
CALL_CALLEE
role.How to reproduce:
matplotlib_example.py
:Output (lines 76-83):
The problem is in
figure
token. It means that we do not take into account function names during our machine learning analysis.P.S.: Moved from bblfsh/bblfshd#82 because it is a python specific problem.
The text was updated successfully, but these errors were encountered: