-
Notifications
You must be signed in to change notification settings - Fork 6
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
result of package "shadow" not reproducible #6
Comments
Looks like we are missing a |
I pushed a fix to master. If you can confirm that it fully fixes the issue you are observing we'll submit a new release to the opam repo. |
I came up with this patch a few months ago, which fixed it for me: --- a/src/shadow/gen/gen.ml
+++ b/src/shadow/gen/gen.ml
@@ -12,7 +12,7 @@ let () =
failwith "bad command line arguments"
in
- let files = Sys.readdir dir |> Array.to_list in
+ let files = Sys.readdir dir |> Array.to_list |> List.sort ~cmp:String.compare in
let all_exposed_modules =
List.filter files ~f:(fun fn -> Filename.check_suffix fn ".cmi") So yes, thanks for doing commit 5d2f886. |
ghost
mentioned this issue
Aug 24, 2021
Alright, new release submitted: ocaml/opam-repository#19314 |
Bronsa
pushed a commit
to imandra-ai/ocaml-opam-repository
that referenced
this issue
Oct 28, 2021
CHANGES: - Make the build more reproducible (@jeremiedimino, fix janestreet/ocaml-compiler-libs#6)
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A rebuild of unchanged sources results in different binaries in the
shadow
package.It looks like this is the culprit:
src/shadow/gen/gen.ml:15: let files = Sys.readdir dir |> Array.to_list in
The result of
readdir()
is not stable. I think the list must be sorted prior further processing.The text was updated successfully, but these errors were encountered: