Nix: Improve build reproducibility and fix OCaml library loading#4105
Nix: Improve build reproducibility and fix OCaml library loading#4105remix7531 wants to merge 7 commits intoFStarLang:masterfrom
Conversation
|
Working on PR 4080, I encountered some issues with the Nix environment:
This draft PR addresses these issues and adds a @gebner @Nadrieril What do you think of the current approach? A few questions:
I'd like to hear your thoughts before restructuring the commits and finalizing this PR. |
|
I will undo the formatting. |
|
Overall looks pretty good to me! I don't mind the formatting commit, I too have autoformat enabled ^^ Can't comment on the F# version, I know nothing about that; the nix looks good if we can avoid the IFD. |
Create ocamlLibraryPath using symlinkJoin to avoid IFD and export it in the dev shell for OCaml shared libraries access. Addresses review feedback from @Nadrieril.
- Expand sourceByRegex to include test directories - Pass ocamlLibraryPath for checkPhase - Add check build with tests enabled
Nadrieril
left a comment
There was a problem hiding this comment.
Much better, LGTM now! I don't have merge rights fyi
|
@gebner Requesting additional review on this PR. I do not have permission to request reviewers directly. Thanks! |
This PR improves the Nix flake for F* with proper OCaml library path handling, better formatting, and an isolated CI testing target.
Changes
Commit 1: Add CAML_LD_LIBRARY_PATH and fix diff sh call
CAML_LD_LIBRARY_PATHfor OCaml shared libraries in devShellnumtopropagatedBuildInputs(required for runtime library loading)diff.shpath in test.mkCommit 2: Sort dependency lists and format
Commit 3: Add isolated CI build target and fix sandbox issues
fstar-ci-nofsharppackage for reproducible testing in pure Nix sandboxpython3,which,util-linuxto build dependencies (required by tests)DUNE_CACHE=disabledto avoid permission errors in sandboxed buildsCAML_LD_LIBRARY_PATHwith auto-discovered OCaml shared library pathsmake 2,test,stage3-diff,test-2-bare,stage2-unit-testsTesting
Test the isolated CI build with:
nix build .#fstar-ci-nofsharp --option sandbox true --option pure-eval true -L