-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(boot): sort readdir output for reproducibility #9861
Conversation
Fixes ocaml#9794 `_boot/dune.exe` is installed, so it needs to be reproducible. This change ensures that the source files are scanned in an order that is independent from the underlying directory entries. This has been tested with `disorderfs --shuffle-dirents=yes`: two runs of `make bootstrap` create the same binary. Signed-off-by: Etienne Millon <me@emillon.org>
eb1d84d
to
c84d187
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With #9735 this produced bit-identical binaries in my tests for openSUSE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this is duneboot
I assume the performance impact of adding a second iteration over the entries plus the sorting is afterwards is not a hot path.
TIL: disorderfs
- cool tool.
Yes, this is only used to build dune itself. |
Fixes ocaml#9794 `_boot/dune.exe` is installed, so it needs to be reproducible. This change ensures that the source files are scanned in an order that is independent from the underlying directory entries. This has been tested with `disorderfs --shuffle-dirents=yes`: two runs of `make bootstrap` create the same binary. Signed-off-by: Etienne Millon <me@emillon.org>
Fixes #9794 `_boot/dune.exe` is installed, so it needs to be reproducible. This change ensures that the source files are scanned in an order that is independent from the underlying directory entries. This has been tested with `disorderfs --shuffle-dirents=yes`: two runs of `make bootstrap` create the same binary. Signed-off-by: Etienne Millon <me@emillon.org>
CHANGES: - Fix performance regression for incremental builds (ocaml/dune#9769, fixes ocaml/dune#9738, @rgrinberg) - Fix `dune ocaml top-module` to correctly handle absolute paths. (ocaml/dune#8249, fixes ocaml/dune#7370, @Alizter) - subst: ignore broken symlinks when looking at source files (ocaml/dune#9810, fixes ocaml/dune#9593, @emillon) - subst: do not fail on 32-bit systems when large files are encountered. Just log a warning in this case. (ocaml/dune#9811, fixes ocaml/dune#9538, @emillon) - boot: sort directory entries in readdir. This makes the dune binary reproducible in terms of filesystem order. (ocaml/dune#9861, fixes ocaml/dune#9794, @emillon)
CHANGES: - Fix performance regression for incremental builds (ocaml/dune#9769, fixes ocaml/dune#9738, @rgrinberg) - Fix `dune ocaml top-module` to correctly handle absolute paths. (ocaml/dune#8249, fixes ocaml/dune#7370, @Alizter) - subst: ignore broken symlinks when looking at source files (ocaml/dune#9810, fixes ocaml/dune#9593, @emillon) - subst: do not fail on 32-bit systems when large files are encountered. Just log a warning in this case. (ocaml/dune#9811, fixes ocaml/dune#9538, @emillon) - boot: sort directory entries in readdir. This makes the dune binary reproducible in terms of filesystem order. (ocaml/dune#9861, fixes ocaml/dune#9794, @emillon)
Fixes #9794
_boot/dune.exe
is installed, so it needs to be reproducible. Thischange ensures that the source files are scanned in an order that is
independent from the underlying directory entries.
This has been tested with
disorderfs --shuffle-dirents=yes
: two runsof
make bootstrap
create the same binary.Signed-off-by: Etienne Millon me@emillon.org