fix(memo): delay implicit output collector#9215
Conversation
|
@snowleopard I don't think this affects you, b/c you don't use implicit output, but it's a bit of a footgun. |
snowleopard
left a comment
There was a problem hiding this comment.
Looks good but I think internally we do rely on implicit output, so I'd prefer to test/benchmark this change internally first. Please hold on with merging.
|
Fixes both bugs I observed: |
|
Is it possible to add a test for this? |
|
Added it here #9247 |
c7d8da6 to
2302d8a
Compare
CHANGES: - Cherry-pick ocaml/dune#9215 and ocaml/dune#9009 (@emillon) - dune-build-info: when `version=""` is found in a `META` file, we now return `None` as a version string (ocaml/dune#9177, @emillon)
|
@snowleopard have you been able to test this internally? This is the last issue blocking the release of 3.12.0. |
Started the benchmarks, will report results later today. Sorry for the delay! |
|
OK, benchmarks look good. I've imported the change as well as the test, and also left a couple of suggestions. |
|
I have a quick question. In many places we have |
Memo now has |
|
Thanks for the explanation. |
|
I'll address the review and merge. |
When doing: ``` let x = Memo.Implicit_output.collect (fun () -> ..) in let* _ = x in let* _ = x in ``` Would share the collecting cell between the binds. That's inconsistent with delaying the side effects until binds. Signed-off-by: Rudi Grinberg <me@rgrinberg.com> <!-- ps-id: 7829e529-690d-4f62-b046-849783409ee8 --> Signed-off-by: Etienne Millon <me@emillon.org>
Co-authored-by: Andrey Mokhov <amokhov@janestreet.com> Signed-off-by: Etienne Millon <etienne.millon@gmail.com> Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
1130e58 to
8a06f80
Compare
|
One reason I write |
Yeah, it's a little annoying but I think I still prefer the explicit version despite the formatting awkwardness. |
When doing:
Would share the collecting cell between the binds. That's inconsistent
with delaying the side effects until binds.
Signed-off-by: Rudi Grinberg me@rgrinberg.com