Skip to content

fix(menhir): preserve compiler stdlib in inference sandbox - #15679

Draft
Alizter wants to merge 2 commits into
ocaml:mainfrom
Alizter:issue-15642-macos-relocatable-compiler
Draft

fix(menhir): preserve compiler stdlib in inference sandbox#15679
Alizter wants to merge 2 commits into
ocaml:mainfrom
Alizter:issue-15642-macos-relocatable-compiler

Conversation

@Alizter

@Alizter Alizter commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Description

Declare the configured compiler standard-library directory as a hidden
dependency of the ocamlc -i invocation used for Menhir type inference. This
materializes the standard library at its executable-relative location when a
package-managed compiler is invoked through a sandbox symlink on macOS, without
adding it to the compiler load path. As a result, -nostdlib and replacement
standard libraries remain respected.

Add a macOS-only regression test with a native compiler wrapper that reproduces
the platform-specific executable-path behavior.

Related Issue and Motivation

Fixes #15642.

Testing

  • The macOS regression-test commit fails with Unbound module Stdlib before the
    fix.
  • The targeted cram test was invoked locally and skipped on the non-macOS host.
  • CI is running against the updated revision.

Alizter added 2 commits August 5, 2026 15:20
Signed-off-by: Ali Caglayan <alizter@gmail.com>
Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter
Alizter force-pushed the issue-15642-macos-relocatable-compiler branch from 94ef90a to 65d688b Compare August 5, 2026 15:38
@Alizter Alizter changed the title fix(menhir): include compiler stdlib during inference fix(menhir): preserve compiler stdlib in inference sandbox Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build fails with Unbound module Stdlib when a project uses menhir with package management

1 participant