libcellml
libcellml copied to clipboard
Issue with checking for import cycles with common units definitions
I've added a test in https://github.com/hsorby/libcellml/pull/13 which demonstrates a possible bug in #837 when checking for cyclical imports of units.
The new test has two models which import the same common units definitions and then one of the models also imports the component from the other model. This results in an cyclical import error reported when the importer resolves the imports. The error message is wrong in that it refers to components as units; and also wrong in that as far as I can tell there is no cycle in the imported units.
The test models added are the minimal demonstration of this that I've reduced from an actual model. Reducing further (e.g., fewer variables, or only importing a subset of the units) results in different behaviour, which is possibly a different issue.
I believe this was fixed in #837?