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
It is vital that the versions for the
Antlr tool used to generate the parser
and the Antlr Python3 runtime match.
E.g., 4.13.0. Using build files will help
eliminate common errors from happening.
I guess, it may or may not work, but if it doesn't work it will be a pain to debug.
Does the requirement interfere with any other package that might be used in combination?
The only way I currently see to resolve this would be generating the parser during package installation instead of shipping the generated parser code.
It was some experiments using localstack that required 4.13.2. Maybe we could get around it restricting it to be >= 4.13.1 and < 4.14? I modified my local installation for now. And at least what i needed of libpetab is working fine with that
The windows story sounds ghastly indeed, as someone that happens to use the platform regularly, i can tell you that just as in any platform if one just grabs miniconda, or creates virtual environments things are much easier.
That being said, i'm not advocating of changing the approach. I'd rather not need a java runtime just to install a python package. so lets not do that. Better to add a section to the libpetab-python readthedocs page on how i'd go ahead and regenerate the parser if i needed it and add a link to that behind the ==4.13.1. Thanks again
Activity
dweindl commentedon Dec 18, 2024
From Antlr:
I guess, it may or may not work, but if it doesn't work it will be a pain to debug.
Does the requirement interfere with any other package that might be used in combination?
The only way I currently see to resolve this would be generating the parser during package installation instead of shipping the generated parser code.
fbergmann commentedon Dec 18, 2024
It was some experiments using localstack that required 4.13.2. Maybe we could get around it restricting it to be >= 4.13.1 and < 4.14? I modified my local installation for now. And at least what i needed of libpetab is working fine with that
dweindl commentedon Dec 18, 2024
For their Python package, there is a runtime check that ignores the patch number, so I guess this might be fine: https://github.com/antlr/antlr4/blob/b91cecf6d06600433a12a12271a7985d2845d7aa/runtime/Python3/src/antlr4/Recognizer.py#L36-L41
However for JS, they also require the same patch number...
https://github.com/antlr/antlr4/blob/b91cecf6d06600433a12a12271a7985d2845d7aa/runtime/JavaScript/src/antlr4/Recognizer.js#L17-L22
I am open to loosening the requirement to some minor version for now, but I guess, that will just postpone the problem...
This seems to be the proper fix, but it would mean additionally requiring
antlr4-tools, which seems to be less smooth on Windows.fbergmann commentedon Dec 18, 2024
The windows story sounds ghastly indeed, as someone that happens to use the platform regularly, i can tell you that just as in any platform if one just grabs miniconda, or creates virtual environments things are much easier.
That being said, i'm not advocating of changing the approach. I'd rather not need a java runtime just to install a python package. so lets not do that. Better to add a section to the libpetab-python readthedocs page on how i'd go ahead and regenerate the parser if i needed it and add a link to that behind the ==4.13.1. Thanks again