4
lorentz
1d

So it turns out that Rust's import resolution is Really Fucking Complicated
https://devrant.molodetz.nl/Screens...
It supports glob re-exports and circular glob imports, conflicts are valid if you don't use them or if they ultimately point at the same name, paths may pass the same module multiple times. It's very convenient to use, I never needed to fight with it, but it's borderline impossible to correctly implement.

Comments
  • 1
    I definitely need glob imports in Orchid in some capacity because DSL authors should be able to create their own preludes, but I'm tempted to only allow a loop-free glob import chain, maybe even turn preludes into a special kind of module that can be targeted by glob-imports but isn't allowed to contain glob-imports itself.
  • 1
    Sometimes the realization of how complex simple appearing things are, makes you appreciate them even more.
Add Comment