@kevin.van.rooijen I'll take a look. Can you maybe write a repro of your issue in a Github issue?
@kevin.van.rooijen I'm not sure what's the right answer here. ^:foo
is expanded into {:foo true}
. Should the :postprocess
function only see {:foo true}
or {:tag FooBar}
(in case of type hints)?
or should it have an extra argument that indicates we're reading metadata?
@kevin.van.rooijen This function is applied to the metadata value after postprocess has been applied: https://github.com/clojure/tools.reader/blob/528e01ef4f4f6b8750b3f9a50c13d6561f254f6d/src/main/cljs/cljs/tools/reader/impl/utils.cljs#L64
maybe desugar should be applied first and then postprocess?
Hmm, that doesn't work, since the value produced by desugar isn't going through the reader
I guess we can implement our own version of desugar
@kevin.van.rooijen The problem here is that the value produced by desugar is not read from source code, so by definition it has no location metadata
@kevin.van.rooijen I now pushed a solution to the branch desugar-postprocess
both forms now get your {{:value :foo} true}
as meta. I do need to look into a performance regression that this may incur
Maybe it's not significant compared to master and my computer is just slower today ;)
yeah, I don't think there is a problem. So please test :)
Hey thanks, I'll take a look right now
Seems to work! Interesting bug
@kevin.van.rooijen merged