Skip to content

Cyclic backpack

Backpack is very similar to hs-boot, but while hs-boot can break cycles (that is it's main purpose!) backpack cannot yet.

@ezyang has written about this so I was surprised I couldn't find an existing issue.

Here is a rough plan:

  1. (#20890) Use multiple home unit support to get rid of the backpack-specific rewrites

  2. Do enough of #20030 so the work graph properly understands hs-boot / hsig, and instantiation nodes. I linked some backpack bugs that should be solved by that to the ticket.

  3. Dedup backpack and hs-boot. With better instantiation nodes, I think that should be fairly straight-forward.

  4. Get cylic backpack for almost free, since hs-boot suports it.

Note that #14095 will also benefit from doing this step might either be helped by this or become a dependency of this. Basically, as the module graph increasingly understands how with hs-boot/hsig we don't compiler/link, and with regular hs corresponding to those two we need to do "extra typechecking", the module graph will inevitably start becoming aware of intra-module compilation stage dependencies.

Edited by John Ericson
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information