potassco / clorm

🗃️ A Python ORM-like interface for the Clingo Answer Set Programming (ASP) reasoner
https://clorm.readthedocs.io
MIT License
52 stars 5 forks source link

Compatibility with Clingo 5.6.0 #114

Closed brmanuel closed 1 year ago

brmanuel commented 1 year ago

The newest version of clorm 1.4.0 seems to be incompatible with the new Clingo release 5.6.0.

In particular, Clorm specifies the requirement Clingo>=5.5.1, thus it's supposed to work with Clingo 5.6.0 However, The ASPTypes used by Clorm seem to have changed in Clingo with the newest release. For instance, Clorm uses ASTType.CspProduct which is no longer defined in Clingo: https://github.com/potassco/clingo/blob/d88141faae07a3895e07451b26bb3dbc652a6c44/libpyclingo/clingo/ast.py#L347

Of course, the hotfix for me is to cap the Clingo version manually in my requirements.txt. But maybe this requires a patch for Clorm making this dependency explicit.

rkaminsk commented 1 year ago

Just had a quick glance. Maybe you rather want to change the ERROR_AST into ACCEPTED_AST and only list supported statement types. This should also be more portable in the future if new language constructs are introduced.

daveraja commented 1 year ago

@brmanuel There is a fixed dev version. I'm just tracking down one last issue and will release a 1.4.1 version to work with the latest clingo.

daveraja commented 1 year ago

1.4.1 now released.