Skip to content

Fix generated manifests and repeated loads in stack_require - #1936

Merged
sangwinc merged 1 commit into
maths:iss1746from
adamant-pwn:codex/granular-loader-fixes
Oct 29, 2026
Merged

sangwinc merged 1 commit into
maths:iss1746from
adamant-pwn:codex/granular-loader-fixes

Conversation

@adamant-pwn

@adamant-pwn adamant-pwn commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes two loader problems in #1927:

  • genmanifest: addresses were rejected. Recognize the prefix at position zero and avoid / in generated library names, since it separates library/item references.
  • Repeated stack_require calls could reload shared variables and overwrite question-defined values. Save the loaded-item set before returning so later calls reuse existing dependencies.

Adds two regression tests covering transitive dependencies and preservation of an overridden variable across separate calls. Both use the question-variable parser and Maxima, without network access.

Tested on Moodle 5.0.10, PHP 8.3.33, PHPUnit 11.5.55 and Maxima 5.44.0 / SBCL 2.5.2:

vendor/bin/phpunit --group qtype_stack_require
vendor/bin/phpunit --group qtype_stack

All 6 loader tests passed. The full STACK group collected 4,959 cases: 4,950 passed, 9 skipped, no failures or errors. Eight skips depend on the Maxima version; one requires the OU maths filter. PHPUnit also reported deprecations and notices.

The analysis, patch and tests were prepared with AI assistance.

@sangwinc
sangwinc merged commit a999d35 into maths:iss1746 Oct 29, 2026
5 checks passed
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