Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

choo: add more comments to choo builder, detect cycles #118

Merged
merged 5 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified apps/choo/bootstrap/choo.jam
Binary file not shown.
12 changes: 11 additions & 1 deletion apps/choo/bootstrap/kernel.hoon
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,11 @@
=/ graph (build-graph-view nodes)
=/ next=(map path node) (update-next nodes graph)
::
:: traverse via a topological sorting of the DAG
:: traverse via a topological sorting of the DAG using Kahn's algorithm
|-
?: .=(~ next)
?. .=(~ graph)
~|(cycle-detected+~(key by graph) !!)
[dep-dag path-dag]
=-
%= $
Expand Down Expand Up @@ -627,6 +629,12 @@
=; dep-vaz=(trap vase)
~> %bout
?: ?=(%hoon -.leaf.n)
::
:: Faces are resolved via depth-first search into the subject.
:: We append the honc (hoon.hoon) to the end of the vase
:: because imports have higher precedence when resolving faces.
:: To avoid shadowing issues with hoon.hoon, attach faces to your
:: imports or avoid shadowed names altogether.
(swet (slew dep-vaz honc) hoon.leaf.n)
=> octs=!>(octs.leaf.n)
|.(octs)
Expand All @@ -641,6 +649,8 @@
~| "couldn't find artifact for {<pax.r>} in build cache"
(~(got by bc) dep-hash)
~& > attaching-face+face.r
::
:: Ford imports are included in the order that they appear in the deps.
(slew vaz (label-vase dep-vaz face.r))
::
:: $label-vase: label a (trap vase) with a face
Expand Down
Loading