summaryrefslogtreecommitdiff
path: root/docs/9p.pdf
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-27 16:42:15 -0300
committerGabriel Schneider <[email protected]>2026-08-27 22:09:08 -0300
commit98b62629795e24de19f535f1072b8a25dcf9f018 (patch)
treefedea7e9b6648236220c054c30e6d2b4f8938288 /docs/9p.pdf
parent147ebd4a36ec7199074ba05bcfb79d4a656c0b74 (diff)
downloadpardes-98b62629795e24de19f535f1072b8a25dcf9f018.tar.gz
pardes-98b62629795e24de19f535f1072b8a25dcf9f018.zip
build: pardes builds without the ESP32-P4 toolchain checkout beside it
`build.zig.zon` named `../05-zig-p4` as a path dependency, and `build.zig` `@import`ed it inside `if (-Desp32p4-firmware)`. But `@import` in a build script is resolved when the SCRIPT is compiled, not when the branch that needs it is taken -- so naming the package at all meant anyone without that sibling checkout could not build pardes AT ALL. Not the firmware: the terminal shell, the SDL shell, the tests. `zig build` failed with build.zig:1073: error: no module named 'zig_p4' available within module 'root.@build' from a line inside an `if` that was false. Neither escape hatch works for a PATH dependency, and both were tried rather than assumed. `.lazy = true` is about FETCHING; a path dep whose directory is absent is generated as a package with no `build.zig` rather than one marked unavailable, so `b.lazyImport` -- which exists for exactly this and is what the standard library says is to `@import` what `lazyDependency` is to `dependency` -- reaches a `@compileError` instead of returning null. Making it a fetched dependency instead is not available either: the toolchain has no remote. So the duplicate goes. That build tree's firmware block linked an image the toolchain repository already knows how to link -- its own build.zig has `-Dpardes`, `-Dapp=<root>` and `-Dpardes-obj=<path>`, and its comments record having learned this same lesson from the other direction, where nesting pardes's ~30-package graph under it broke every build there. The object is the seam: it crosses by PATH and never by package, and each repository builds what it owns the pieces of. zig build -Dplatform=esp32p4 # here, no toolchain needed zig build -Dpardes # there, the console image zig build -Dpardes -Dapp=<pardes>/src/esp32p4_9p.zig # there, the 9P image For the second and third to work with no module map, `src/board9p.zig` and the 9P firmware root now reach the codec by PATH instead of through a named `ninep` module that only pardes's own build.zig knew to inject -- which is also why the root moved from `src/esp32p4/nine.zig` up to `src/esp32p4_9p.zig`, beside `src/esp32p4.zig`: a path import may not escape its module's own directory. Both files are now self-contained, and `zig test src/board9p.zig` works with no flags. `-Desp32p4-port`, `-Desp32p4-prof` and `-Desp32p4-cpu-mhz` go with the block. An option this build cannot honour is worse than no option, because it accepts the flag and then ignores it; all three are spelled the same way in the toolchain. Verified by moving ../05-zig-p4 out of the way: `zig build`, `zig build -Dplatform=esp32p4` and `zig build unit-test` all pass without it. With it back, the toolchain still links both images -- console 812,720 B, 9P 88,096 B. next-steps.txt gains the six features the 9P chain shipped.
Diffstat (limited to 'docs/9p.pdf')
-rw-r--r--docs/9p.pdf6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/9p.pdf b/docs/9p.pdf
index 9d2dc054..961473bc 100644
--- a/docs/9p.pdf
+++ b/docs/9p.pdf
@@ -2773,12 +2773,12 @@ F��Mk�I���R�B|��&إ�n�ऋ��(�H�r�Tų��9�`�� ըa�&�ʺ���:�l
endstream
endobj
748 0 obj
-<</Creator(Typst 0.15.1)/ModDate(D:20260827161944-03'00)/CreationDate(D:20260827161944-03'00)>>
+<</Creator(Typst 0.15.1)/ModDate(D:20260827220904-03'00)/CreationDate(D:20260827220904-03'00)>>
endobj
749 0 obj
<</Length 997/Type/Metadata/Subtype/XML>>
stream
-<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.15.1</xmp:CreatorTool><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmp:ModifyDate>2026-08-27T16:19:44-03:00</xmp:ModifyDate><xmp:CreateDate>2026-08-27T16:19:44-03:00</xmp:CreateDate><xmpTPg:NPages>12</xmpTPg:NPages><dc:format>application/pdf</dc:format><xmpMM:InstanceID>HljsDPgWqw9TTnj4ezsOYg==</xmpMM:InstanceID><xmpMM:DocumentID>HljsDPgWqw9TTnj4ezsOYg==</xmpMM:DocumentID><xmpMM:RenditionClass>proof</xmpMM:RenditionClass><pdf:PDFVersion>1.7</pdf:PDFVersion></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
+<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.15.1</xmp:CreatorTool><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmp:ModifyDate>2026-08-27T22:09:04-03:00</xmp:ModifyDate><xmp:CreateDate>2026-08-27T22:09:04-03:00</xmp:CreateDate><xmpTPg:NPages>12</xmpTPg:NPages><dc:format>application/pdf</dc:format><xmpMM:InstanceID>eoOUAEv34jOjSGsTdiY5Ag==</xmpMM:InstanceID><xmpMM:DocumentID>eoOUAEv34jOjSGsTdiY5Ag==</xmpMM:DocumentID><xmpMM:RenditionClass>proof</xmpMM:RenditionClass><pdf:PDFVersion>1.7</pdf:PDFVersion></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
endstream
endobj
750 0 obj
@@ -3538,7 +3538,7 @@ xref
0000178455 00000 n
0000179529 00000 n
trailer
-<</Size 751/Root 750 0 R/Info 748 0 R/ID[(HljsDPgWqw9TTnj4ezsOYg==)(HljsDPgWqw9TTnj4ezsOYg==)]>>
+<</Size 751/Root 750 0 R/Info 748 0 R/ID[(eoOUAEv34jOjSGsTdiY5Ag==)(eoOUAEv34jOjSGsTdiY5Ag==)]>>
startxref
179734
%%EOF \ No newline at end of file