Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparing python sources doesn't work on Windows #151

Closed
KOLANICH opened this issue Jun 12, 2019 · 9 comments
Closed

Comparing python sources doesn't work on Windows #151

KOLANICH opened this issue Jun 12, 2019 · 9 comments
Assignees

Comments

@KOLANICH
Copy link

KOLANICH commented Jun 12, 2019

I have tried to overcome that with a cmd script put into various dirs without any success.

@jrfaller jrfaller self-assigned this Jun 13, 2019
@jrfaller jrfaller added the bug label Jun 13, 2019
@jrfaller
Copy link
Member

ok thanks for the BR. Just for info you can use the docker image of Gumtree on windows that will resolve this problem. Also, the python parser is not very good and have not been really tested, unfortunately.

@jrfaller
Copy link
Member

I am tagging this help wanted since I do not have a Windows machine ;)

@jrfaller
Copy link
Member

And well there might be a good parser here : https://github.com/davidhalter/parso (posting this here to remember the link)

@KOLANICH
Copy link
Author

Just for info you can use the docker image of Gumtree on windows that will resolve this problem.

No, I cannot.

And well there might be a good parser here : https://github.com/davidhalter/parso (posting this here to remember the link)

It may be. But I don't understand why do you think that just ast is not enough for this use case.

@jrfaller
Copy link
Member

For instance this : gristlabs/asttokens#27

@lavenzg
Copy link

lavenzg commented Jul 31, 2019

Is there a version of gumtree using the parso parser? The current python parser cannot handle a few python files in my current project.

@lavenzg
Copy link

lavenzg commented Jul 31, 2019

Maybe the reason of failures is that ASTs on python2 and pyton3 are different. I changed the pythonparser module to python3, it can fix some failures, but it fails on some other python files.
Finally I have to replace asttokens with parso. Now it works on my current collected python files.

@jrfaller
Copy link
Member

jrfaller commented Oct 3, 2019

@lavenzg I have updated pythonparser a bit to simplify the code and to have it produce a XML directly compatible with gumtree. Could you show me how I can change asttokens to parso? A pull-request would be great :)

@jrfaller
Copy link
Member

ok all, we have now parso backed python parser, therefore I will close all python related issues, post new issues for the matter of python integration in GumTree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants