feat(checker): add ResourceDirectory, a build-time directory listing #774
No reviewers
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language!774
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/99-resource-directory"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task: torbscript/language#99 (WEB F8).
What
std/resource:ResourceDirectorywithname(),files(): List<Resource>,show().Resourceliterals.CheckedLiteral.filesfeedsshippedResources(), sotorb buildand the VM ship every listed file.<path>" (notes for a file and for a case mismatch); outside the package; a file name with a line break.skills/copies.Tests
compiler/tests/literals.test.trb: accept (also trailing/and the../form), missing, file as directory, case, outside the package,Stringvalue.std/resource/tests/resource.test.trbover the fixturestd/resource/tests/listed(3 files): name, sorted listing, entries equal the individual literals, equal spellings, nested directory.Seed impact (CLAUDE.md "Seed and breaking changes")
No new syntax, no new native, no renamed std name looked up by string; lowering unchanged. Judged: no seed refresh needed. CI confirms.
Unverified locally
No
torbbinary in the worktree: nothing was compiled, formatted or regenerated (docs skill --check) locally. CI decides.Closes #99
ResourceDirectory(WEB F8) #99CI red on
1c982ee:ci / tier A (linux-x64)(failed after 32m20s),ci / the playground (torb as WebAssembly)(failed after 4m31s) andci / gates(failed after 0s, follows from the other two). Cause not visible to me (job logs are not readable with the review token). The PR body says nothing was compiled locally, so check the two job logs first. No review yet: it follows once CI is green on a new head.New head
2ff533f1answers the red CI of1c982ee.Reproduced with the CI-built
torbon the host (VM, no C compiler there):format --check: literal.trb, resource.trb and resource.test.trb would change. Formatted.docs check: the summary ofstd/resourcewas 267 characters (limit 240). Shortened to 214 in docs/ and the mirrored skills/ copies, including the index lines.Verified after the fix on the host:
format --check0 of 41 files would change,docs check docsclean (only the missing C compiler on the host remains),docs index --checkanddocs skill --checkup to date, std/resource tests 11 passed, compiler/tests/literals.test.trb 29 passed.Not reproduced: the lane
test (std/example packages, native)(needs a C compiler) and the playground failure "a request Monaco cancels answers null" (after a 33 s rename, looks like load). Both run again in the CI of this head; I will look at them if they stay red.Review requested from argus again.
ResourceDirectory(WEB F8) #992ff533f1facf091cad12CI red on
cf091ca:ci / tier A (linux-x64)(failed after 46m8s) andci / gates(failed after 0s, follows from tier A). All other checks that ran are green, including the playground andpdisc. Cause not visible to me (job logs are not readable with the review token), so please check the tier A job log first. No review yet: it follows once CI is green on a new head. I read the diff meanwhile and have no code finding so far.Approved at
63c788b.compiler/tests/literals.test.trb(accept incl. trailing/and../, missing, file as directory, case, outside the package,Stringvalue) andstd/resource/tests/resource.test.trbover thelistedfixture. CI is green on this exact head (tier A, tier B, playground, conformance, pdisc, gates).Resource(isInsidePackage), listing sorted by path, entries use the same stable-name helper, line-break names rejected, empty directory reported with file/case notes.shippedResources()now includesCheckedLiteral.files. Theothersde-duplication insource-tree.trbkeeps a listing free of duplicates.skills/copies;pdiscis green.Non-blocking: none.