Infer Release prep#2033
Closed
martintrojer wants to merge 4 commits into
Closed
Conversation
Add a --local-opam-switch flag to build-infer.sh that creates a project-local opam switch (stored in _opam/ within the repo root) instead of using or creating a global named switch. This solves the problem of build-infer.sh modifying the shared global opam switch (default: 5.3.0+flambda) when building. Running the script without this flag will pin packages (charon, pyml, camlzip, etc.) and install dependencies into the global switch, which can interfere with other infer checkouts or OCaml projects on the same machine that share that switch. A local switch keeps all installed packages isolated to this specific project directory. The new flag uses `opam switch create <path> --no-install` to create the local switch. The --no-install flag is necessary because opam auto-detects .opam files in the project root and would otherwise try to resolve and install infer's dependencies (including charon) before install_opam_deps() has had a chance to pin them, causing a "missing dependency" error. Interaction with other opam-related flags: - --local-opam-switch and --user-opam-switch are mutually exclusive (the script errors out if both are passed). --user-opam-switch says "use whatever switch I already have active", while --local-opam-switch says "create a fresh isolated switch here". - --only-setup-opam works as before: it sets up the (now local) switch and installs dependencies, then exits before building. - --no-opam-lock is orthogonal and works unchanged: it controls whether opam resolves dependencies freely or uses the lockfile. - If _opam/ already exists from a previous run, the switch is reused rather than recreated, supporting incremental builds. Cleanup: `opam switch remove .` or `rm -rf _opam`. The _opam directory is already in .gitignore.
ocaml-option-fp requires ocaml-variants >= 5.4.0, conflicting with the 5.3.0 switch pinned in CI (same fix as 5cf01c0e79).
ubuntu-26.04 runner doesn't exist yet on GitHub Actions, so use ubuntu-latest with the apt.llvm.org repository to get clang-21/llvm-21.
151090b to
33cd60d
Compare
CMake 4.x (shipped with Xcode 16.4 on macOS) removed compatibility with cmake_minimum_required versions below 3.5, causing the clang_compilation_db and cmake build system tests to fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.