Skip to content

antlr runtime version #344

Open
Open

Description

@fbergmann

Currently the requriements for petab are antlr4-python3-runtime==4.13.1 is petab really incompatible with 4.13.2?

Activity

  1. dweindl commented on Dec 18, 2024

    @dweindl
    Member

    From Antlr:

    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.

  2. fbergmann commented on Dec 18, 2024

    @fbergmann
    CollaboratorAuthor

    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

  3. dweindl commented on Dec 18, 2024

    @dweindl
    Member

    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...

    The only way I currently see to resolve this would be generating the parser during package installation instead of shipping the generated parser code.

    This seems to be the proper fix, but it would mean additionally requiring antlr4-tools, which seems to be less smooth on Windows.

  4. fbergmann commented on Dec 18, 2024

    @fbergmann
    CollaboratorAuthor

    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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions