mach
mach copied to clipboard
Use of reader literal ref unintuitive
When I use the ref literal pointing at the result of a ClojureScript expression, it doesn't work as expected. For example, what should happen in the below case:
{
config (aero.core/read-config "config.edn" {})
foo (println #ref [config :some-item])
}
Even if some-item exists in the config, the above will not print it out. This is because resolve-references happens against uneval'ed code.
Makes me think resolve-references is happening at an incorrect stage?
This requires #ref to be factored into the topological sorting system. See aero for how this can be done. It's quite complicated.