Skip to content

Fix comp dummy doc when flattening - #514

Merged
fbergmann merged 4 commits into
developmentfrom
fix-comp-dummy-doc
Nov 12, 2026
Merged

fbergmann merged 4 commits into
developmentfrom
fix-comp-dummy-doc

Conversation

@luciansmith

Copy link
Copy Markdown
Member

New version of #506: reset mCheckingDummyDoc.

This exposed an old bug in the rest of the code, which is now also fixed: an 'enablePackage' call did not do what we wanted to; 'enablePackageInternal' was necessary.

matthiaskoenig and others added 4 commits November 2, 2026 17:04
CompSBMLDocumentPlugin::checkConsistency set mCheckingDummyDoc and
mFlattenAndCheck on the plugin of the document it checks, to make the
dummy documents it copies from it skip their model definitions and their
flat model. mCheckingDummyDoc was never reset, and mFlattenAndCheck not
after an error in a model definition, so a second check of the document
and a copy of it skipped the model definitions, and after such an error
also the flat model. The flags are now set on the dummy document only.

Refs #505.
Merge Mattias's changes to local branch
The intent of 'enablePackage' was to give the model the comp plugins again, but it didn't; we need enablePackageInternal instead.
@luciansmith

Copy link
Copy Markdown
Member Author

OK! The bug was found and fixed; the rest of Matthias's changes should be in.

Now working on Part Two of the fix; there's several things that I've (we've) found that also slow things down, including a double-check of the dummy model which doubled the validation time.

@luciansmith luciansmith changed the title Fix comp dummy doc Fix comp dummy doc when flattening Nov 12, 2026

@fbergmann fbergmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fbergmann
fbergmann merged commit ad1a9fb into development Nov 12, 2026
35 checks passed
@fbergmann
fbergmann deleted the fix-comp-dummy-doc branch November 12, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants