You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Client hangs with no error message, potential alternative to build-essentials for windows #199
Currently the python client does not work for me it just hangs on attempting to parse a file.
I am only running the following:
client = bblfsh.BblfshClient("localhost:9432")
print("parsing")
ctx = client.parse("ast.py")
I realized it maybe because I haven't installed the required dependencies:
"Dependencies
You also will need a curl cli tool to dowload libuast, and a g++ for building libuast Python bindings. The command for Debian and derived distributions would be:
sudo apt install curl build-essential"
Is there a windows alternative for this?
Just as an FYI I get the following in the docker server log
changed the title [-]Alternative to build-essentials for windwos[/-][+]Client hangs with no error message, potential alternative to build-essentials for windows[/+]on Jan 3, 2020
Ohh, ok - in my opinion it can't work well on windows (where bblfshd internally creates subcontainers with communicates over grpc on top of std. IO).
Regarding query -you can filter with xpath whatever you want, e.g. next(ctx.filter("boolean(//*[@startOffset or @endOffset])"))
Every position is a tuple (Type, Col, Line, Offset), so in theory it should be doable.
Activity
invertednz commentedon Jan 3, 2020
I tried installing https://nuwen.net/mingw.html but still no error, the command just hangs with no output.
[-]Alternative to build-essentials for windwos[/-][+]Client hangs with no error message, potential alternative to build-essentials for windows[/+]kuba-- commentedon Jan 3, 2020
Have you installed python driver on bblfsh server?
Is (bblfshd) running locally or inside a docker container?
invertednz commentedon Jan 4, 2020
Hey Kuba,
I have the bblfshd running in a docker container.
And these are my drivers. If I try to update the python one it says this is already the latest.
PS C:\Users\james> docker exec -it bblfshd bblfshctl driver list
+------------+------------------------------------------+---------+--------+----------+----+--------+
| LANGUAGE | IMAGE | VERSION | STATUS | CREATED | GO | NATIVE |
+------------+------------------------------------------+---------+--------+----------+----+--------+
| python | docker://bblfsh/python-driver:latest | v2.10.3 | beta | 2 months | | |
| cpp | docker://bblfsh/cpp-driver:latest | v1.5.0 | beta | 3 months | | |
| java | docker://bblfsh/java-driver:latest | v2.7.5 | beta | 2 months | | |
| javascript | docker://bblfsh/javascript-driver:latest | v2.10.2 | beta | 2 months | | |
| bash | docker://bblfsh/bash-driver:latest | v2.7.2 | beta | 2 months | | |
| ruby | docker://bblfsh/ruby-driver:latest | v2.9.6 | beta | 2 months | | |
| go | docker://bblfsh/go-driver:latest | v2.7.3 | beta | 2 months | | |
| csharp | docker://bblfsh/csharp-driver:latest | v1.7.1 | beta | 2 months | | |
| php | docker://bblfsh/php-driver:latest | v2.8.3 | beta | 2 months | | |
+------------+------------------------------------------+---------+--------+----------+----+--------+
Response time 5.6423ms
kuba-- commentedon Jan 5, 2020
ok, could you give me your python file, so I'll try to reproduce it?
invertednz commentedon Jan 6, 2020
Sure, although it happens with every file that I've tried and I managed to get everything working with ubuntu, so I think it is the windows setup.
ast.py
I was wondering is it possible to query on a line number? And is it possible to go from a node up to the parent node? Or can you only iterate like -
kuba-- commentedon Jan 6, 2020
Ohh, ok - in my opinion it can't work well on windows (where bblfshd internally creates subcontainers with communicates over grpc on top of std. IO).
Regarding query -you can filter with xpath whatever you want, e.g.
next(ctx.filter("boolean(//*[@startOffset or @endOffset])"))Every position is a tuple (Type, Col, Line, Offset), so in theory it should be doable.