fix: pass O_SHARE_DELETE when digesting files#8262
Conversation
rgrinberg
left a comment
There was a problem hiding this comment.
Can we leave the old code on Unix? Channels have mutexes that we don't really need here
|
I'll try the other following approaches:
|
|
Ah, even better: adding |
e3754f1 to
bccc862
Compare
|
There's still a part I don't completely understand (why the file is closed too late in some cases) but it might be related to the details of threading and win32unix. |
nojb
left a comment
There was a problem hiding this comment.
LGTM. Understanding why the file is not closed in the first place would be ideal of course, but this fix looks solid.
bccc862 to
ae8941e
Compare
|
I added a comment explaining the situation. let me know what you think. |
Fixes ocaml#8268 This flag corresponds to what `Stdlib.open_in` does. When passed, the files can be removed while they are still open. This condition can happen when background digests are enabled. This is a no-op everywhere else. This allows enabling background digests on Windows. Signed-off-by: Etienne Millon <me@emillon.org>
ae8941e to
86d940c
Compare
LGTM |
|
LGTM |
CHANGES: - Add `dune show rules` as alias of the `dune rules` command. (ocaml/dune#8000, @Alizter) - Fix `%{deps}` to expand properly in `(cat ...)` when containing 2 or more items. (ocaml/dune#8196, @Alizter) - Add `dune show installed-libraries` as an alias of the `dune installed-libraries` command. (ocaml/dune#8135, @Alizter) - Fix the `severity` of error messages sent over RPC which was missing. (ocaml/dune#8193, @Alizter) - Add `dune build --dump-gc-stats FILE` argument to dump garbage collection stats to a named file. (ocaml/dune#8072, @Alizter) - Fix bug with ppx and Reason syntax due to missing dependency in sandboxed action (ocaml/dune#7932, fixes ocaml/dune#7930, @Alizter) - Add `dune describe package-entries` to print all package entries (ocaml/dune#7480, @moyodiallo) - Improve `dune describe external-lib-deps` by adding the internal dependencies for more information. (ocaml/dune#7478, @moyodiallo) - Re-enable background file digests on Windows. The files are now open in a way that prevents race condition around deletion. (ocaml/dune#8262, fixes ocaml/dune#8268, @emillon)
CHANGES: - Add `dune show rules` as alias of the `dune rules` command. (ocaml/dune#8000, @Alizter) - Fix `%{deps}` to expand properly in `(cat ...)` when containing 2 or more items. (ocaml/dune#8196, @Alizter) - Add `dune show installed-libraries` as an alias of the `dune installed-libraries` command. (ocaml/dune#8135, @Alizter) - Fix the `severity` of error messages sent over RPC which was missing. (ocaml/dune#8193, @Alizter) - Add `dune build --dump-gc-stats FILE` argument to dump garbage collection stats to a named file. (ocaml/dune#8072, @Alizter) - Fix bug with ppx and Reason syntax due to missing dependency in sandboxed action (ocaml/dune#7932, fixes ocaml/dune#7930, @Alizter) - Add `dune describe package-entries` to print all package entries (ocaml/dune#7480, @moyodiallo) - Improve `dune describe external-lib-deps` by adding the internal dependencies for more information. (ocaml/dune#7478, @moyodiallo) - Re-enable background file digests on Windows. The files are now open in a way that prevents race condition around deletion. (ocaml/dune#8262, fixes ocaml/dune#8268, @emillon)
Fixes ocaml#8268 This flag corresponds to what `Stdlib.open_in` does. When passed, the files can be removed while they are still open. This condition can happen when background digests are enabled. This is a no-op everywhere else. This allows enabling background digests on Windows. Signed-off-by: Etienne Millon <me@emillon.org>
Fixes ocaml#8268 This flag corresponds to what `Stdlib.open_in` does. When passed, the files can be removed while they are still open. This condition can happen when background digests are enabled. This is a no-op everywhere else. This allows enabling background digests on Windows. Signed-off-by: Etienne Millon <me@emillon.org>
CHANGES: - Add `dune show rules` as alias of the `dune rules` command. (ocaml/dune#8000, @Alizter) - Fix `%{deps}` to expand properly in `(cat ...)` when containing 2 or more items. (ocaml/dune#8196, @Alizter) - Add `dune show installed-libraries` as an alias of the `dune installed-libraries` command. (ocaml/dune#8135, @Alizter) - Fix the `severity` of error messages sent over RPC which was missing. (ocaml/dune#8193, @Alizter) - Add `dune build --dump-gc-stats FILE` argument to dump garbage collection stats to a named file. (ocaml/dune#8072, @Alizter) - Fix bug with ppx and Reason syntax due to missing dependency in sandboxed action (ocaml/dune#7932, fixes ocaml/dune#7930, @Alizter) - Add `dune describe package-entries` to print all package entries (ocaml/dune#7480, @moyodiallo) - Improve `dune describe external-lib-deps` by adding the internal dependencies for more information. (ocaml/dune#7478, @moyodiallo) - Re-enable background file digests on Windows. The files are now open in a way that prevents race condition around deletion. (ocaml/dune#8262, fixes ocaml/dune#8268, @emillon)
Fixes #8268
This flag corresponds to what
Stdlib.open_indoes. When passed, the files can be removed while they are still open. This condition can happen when background digests are enabled. This is a no-op everywhere else.This allows enabling background digests on Windows.