-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[22.01] Fix macro parsing #13373
[22.01] Fix macro parsing #13373
Conversation
26e6742
to
012f44a
Compare
so far imported macro element were inserted into the macros element of the tool xml .. just to be removed again in the end (except for template macros) so it seems cleaner (and maybe a bit faster) to store the macros in lists (kept in a dict separating xml, token, and template macros)
I guess we should test this against IUC? I'm not 100% satisfied how the code looks like (in comparison with the 21.09 state) .. but maybe this can be "fixed" later? What do you think? |
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
adeb2f1
to
c092b2f
Compare
We only create XmlMacroDef later on.
Tested in galaxyproject/tools-iuc#4367 (comment) and looks good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good and fixes the visualization macro parsing, so let's get it in ?
I'm gonna take the liberty and move it out of draft, hope that's ok @bernt-matthias! |
This PR was merged without a "kind/" label, please correct. |
fixes #13277
follow up on #13186 and #12978
The mentioned PRs tried to store the path to macro files for xml nodes loaded from imported macros (to get a more meaningful lint error message). Unfortunately lxml does this by adding a
xml:base
attribute to the nodes which has all sorts of side effects:The primary change of this PR is to revert storing this additional information.
The subsequent commits aim at speeding up parsing a bit more: So far imported macros were added to the macros node just to be removed again at the end. Now they are directly stored in lists.
How to test the changes?
(Select all options that apply)
License