sci

https://github.com/babashka/SCI - also see #babashka and #nbb
borkdude 2020-08-05T07:29:57.397Z

@kevin.van.rooijen I'll take a look. Can you maybe write a repro of your issue in a Github issue?

borkdude 2020-08-05T08:29:06.398500Z

@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)?

borkdude 2020-08-05T08:29:24.398900Z

or should it have an extra argument that indicates we're reading metadata?

borkdude 2020-08-05T08:31:01.399300Z

@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

borkdude 2020-08-05T08:32:54.399900Z

maybe desugar should be applied first and then postprocess?

borkdude 2020-08-05T08:40:21.400300Z

Hmm, that doesn't work, since the value produced by desugar isn't going through the reader

borkdude 2020-08-05T08:45:57.400600Z

I guess we can implement our own version of desugar

borkdude 2020-08-05T08:52:25.401600Z

@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

borkdude 2020-08-05T09:06:13.402Z

@kevin.van.rooijen I now pushed a solution to the branch desugar-postprocess

borkdude 2020-08-05T09:06:39.402500Z

both forms now get your {{:value :foo} true} as meta. I do need to look into a performance regression that this may incur

borkdude 2020-08-05T09:07:19.402900Z

Maybe it's not significant compared to master and my computer is just slower today ;)

borkdude 2020-08-05T09:09:25.403200Z

yeah, I don't think there is a problem. So please test :)

kwrooijen 2020-08-05T10:05:32.403600Z

Hey thanks, I'll take a look right now

kwrooijen 2020-08-05T10:10:55.404Z

Seems to work! Interesting bug

borkdude 2020-08-05T11:26:28.404300Z

@kevin.van.rooijen merged

🙌 2