Skip to content
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

PGML requires PGbasicmacros.pl, but does not load it #2564

Open
dlglin opened this issue Sep 5, 2024 · 2 comments
Open

PGML requires PGbasicmacros.pl, but does not load it #2564

dlglin opened this issue Sep 5, 2024 · 2 comments

Comments

@dlglin
Copy link
Member

dlglin commented Sep 5, 2024

This might be a broader discussion: should a macro file load all of its dependencies?

I don't know that it's even possible to craft a meaningful problem without PGbasicmacros.pl, so it's unlikely that someone will run into this in practice, but it is theoretically a bug.

Fixing this would mean having PGML.pl load PGbasicmacros.pl, which will be redundant in almost all (and maybe all practical) cases.

@somiaj
Copy link
Contributor

somiaj commented Sep 15, 2024

This issue should probably be moved over to pg.

LoadMacros will now only ever load a macro once, so adding PGbasicmacros.pl to the list of macros PGML.pl loads (currently MathObjects.pl and niceTables.pl) should have no effect for problems that already have loaded PGbasicmacros.pl and correctly load it in the cases it wasn't loaded. So that would fix this issue for the time being.

somiaj added a commit to somiaj/pg that referenced this issue Sep 15, 2024
PGML.pl depends on PGbasicmacros.pl, so load that macro in case
it hasn't already been loaded.

This fixes openwebwork/webwork2#2564.
@drgrice1
Copy link
Member

It should be noted that PGML.pl has depended on PGbasicmacros.pl since 2015 when it started using the EV3P method. So this is not something that has changed in recent releases.

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

No branches or pull requests

3 participants