Module 13 · In Studio · challenge 3 of 3 in this lesson
order puts every dependency before its dependents and ignores the order of the input list
A test in Studio grades it and prints a pass code.
Open
Level 3, Professional
Challenge
Write order and boot in challenges/work/service_loader.luau. The test uses the yard's real dependency lists and shuffles them. The written solution is challenges/solutions/architecture-at-scale.md. In Play, run game.ServerScriptService.RunGameTests:Invoke("architecture-at-scale", "arch-loader") and paste the pass code here.
- Start from
- The game at milestone m14 (download)
- Grade it
- In Studio, press Play, then run
game.ServerScriptService.RunGameTests:Invoke("architecture-at-scale", "arch-loader")in the server command bar. Copy the pass code from Output.
Done means
- order puts every dependency before its dependents and ignores the order of the input list
- Ties go to the name that sorts first, picked one at a time
- A cycle returns nil and 'cycle: ...' naming only the services in the loop; an unknown dependency names both services
- With roots, order returns only the roots and what they need
- boot runs every init, then every start with exactly its declared deps, and runs nothing on an error
- challenges/architecture-at-scale.luau prints TEST PASS for every check