You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Library pack refresh rewrites parts whose libraries did not change #116
The weekly refresh that opened #111 (pack 1.0.1) changed 35 parts, but only five libraries changed: BranchingScenario 1.11.2, Components 1.0.101, Flashcards 1.7.24, MemoryGame 1.3.53 and QuestionSet 1.21.14. The other 30 parts hold the same entries as before (names, CRC-32s, sizes) in another order:
A part's id is its SHA-256, and the libraries revision covers each archive's entries in order. So browsers download those parts again, and every package the pack serves with one of them gets a new revision and starts its saved state over once. That includes packages that use none of the five updated libraries, such as a Course Presentation or an Interactive Video exported without its libraries. A pack release is meant to change nothing for a package whose libraries it does not touch.
Cause
apps/demo/scripts/build-libraries.mjs takes each library from the first bundle in CONTENT_TYPES that carries its newest version, with its files in that bundle's order. Branching Scenario's bundle is the first to carry Text, Course Presentation, Interactive Video, Video and the parts they hold. The hub rebuilt that bundle for Branching Scenario 1.11.2, with the files in another order.
The workflow's guard did not catch it: it stops only when the files change and no library in libraries.txt does.
Fix
Write the pack with a library's entries taken from the committed pack, as they are, when its files are the same, so its part comes out as before.
Have the workflow stop when a part changes and its library's line in libraries.txt does not.
Then run the workflow again, so that Library pack 1.0.1 #111 holds the five updated libraries alone.
Activity
Merge pull request #118 from missing-elements/fix/pack-unchanged-parts