Conversation
Switch the required autoconf to 2.72
runtime: Fix sigaltstack call with musl on certain Intel CPUs
Istackoffset allocated only n bytes, but slot_offset places outgoing stack arguments at SP + reserved_stack_space + n, so a call with more than 8 integer arguments overflowed into the caller's frame. Add reserved_stack_space to the allocation (and release it on deallocation).
Previously we used r31 which is also the frame pointer register for PPC64 so we move it to r23 (which is unused) and can use it as a frame pointer register later on. Using r31 also lines up with C frame pointer usage.
Without this patch, the openSUSE ocaml package builds would unpredictably
vary in hard to reproduce ways.
.depend makes root-directory targets (ocamldoc, the debugger, ...) depend
on otherlibs/str/str.cmi and otherlibs/unix/unix.cmi. Nothing stopped the
generic %.cmi rule of the root Makefile from building those itself, so
under make -j they were compiled either from the root directory or by
"make -C otherlibs", whichever got there first.
The two compilations do not agree on the source path they record in the
.cmi ("otherlibs/str/str.mli" vs "str.mli"), which changes the interface
digest. Since that digest is embedded in every .cmi/.cmt/.cmx/.cma/.cmxa
of every unit that (transitively) uses Str or Unix, a large part of the
installed tree ended up differing from one build to the next, including
ocamldoc, ocamldebug and all of otherlibs/{str,unix,systhreads}.
Give both files an empty recipe depending on otherlibraries, so the
generic rule no longer applies and "make -C otherlibs" is always the one
that compiles them.
And same for the .cmx variant.
Pexp_holeCo-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dra27-js
force-pushed
the
upstream-Pexp_hole
branch
2 times, most recently
from
August 6, 2026 13:29
008e295 to
07d22b8
Compare
Print newline after `Pexp_unreachable` in `Printast`
Makefile: fix race with otherlibs str + unix.cmi/.cmx
Add Uchar.{is_ascii,ascii_to_char,is_latin1,latin1_to_char}
…ve or contractive (ocaml#14982)
add OSEC advisory reference
contributing: mention possibility to RFC; flatter alt contrib list
…pt-stream Runtime events corrupt stream fix Fixes ocaml#14151
…ds-direct Add runtime events for direct major allocations and GC ramp-up
ocaml#14898: lambda/Translcore, do not trust GADT equations introduced by a partial match
…uctions-from-hacking remove instructions for `opam custom-install`
add Stefan Muenzel as maintainer
The expansiveness check should consider effect cases
Weak.get_copy: copying continuations is unsafe, so don't copy them.
Fix with module type precedence
dra27
force-pushed
the
upstream-Pexp_hole
branch
from
September 14, 2026 10:12
7c94e0d to
7fef74c
Compare
Record the current behaviour of the wildcard `_` appearing in expression positions: - `~_:` and `?_:` already lex as labels named `_` - where a general expression can start, the parser recognizes `_` via an ad hoc rule in order to report a specific syntax error; - where only a simple expression is allowed (function-argument positions), "_" is a plain syntax error. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dra27
force-pushed
the
upstream-Pexp_hole
branch
2 times, most recently
from
September 14, 2026 13:56
e5377da to
c756769
Compare
Parse `_` as Pexp_hole in simple_expr and as Pmod_hole in module_expr Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dra27
force-pushed
the
upstream-Pexp_hole
branch
from
September 14, 2026 14:09
c756769 to
a93cc68
Compare
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.
This PR first extends the parser to recognise syntax errors specifically related to invalid uses of
_in more places. It then converts these illegal_to a new parsetree node, moving the error handling for encountering them to the type checker. The value of this change is that ppxes can both transform parsetrees which include the new node, and also use the OCaml parser to parse attribute and extension point payloads which include them.The names
Pexp_holeandPmod_holeoriginate from ocaml/merlin#1242 where they were temporarily part of Merlin's AST before being replaced with extensions in ocaml/merlin#1503 in order to remain compatible with ppx infrastructure.Pexp_holereturned in a (highly experimental) feature in oxcaml/oxcaml#3310 which introduced it to the (OxCaml) compiler. Although the feature in OxCaml remains incomplete, we have found the node to be very useful in ppxes, and the parsing was extended in oxcaml/oxcaml#4956 entirely with ppx use in mind. We think the node is a useful addition to the parsetree, even without a language feature that directly requires it. We haven't usedPmod_holein ppxes, but the intention is that having bothPexp_holeandPmod_holein the AST means that Merlin can use it as well (see OxCaml's Merlin changes in oxcaml/oxcaml#6960).The PR itself is five fairly straightforward commits, which are worth reviewing separately:
fun_expruses of_displaying the existing "unexpected wildcard" parsing error, and all the additionalsimple_exprandmodule_exprpoints where a standard "syntax error" is displayedPexp_holeas a simple expression oxcaml/oxcaml#4956, without the parsetree node), extends the handling of_tosimple_expr, which can be seen in the parse-errors test outputPexp_hole, removing the hack from the parser and instead converting the error to come directly from the type checkerPmod_holeThere are various subtleties (visible in the reference files) to do with
_and~/?corner cases. For information, the original work predates LLM-use - Claude's responsibility in this PR was rebasing the work from OxCaml, refactoring the work to be a syntax change, then a parsetree change, and adding the tests to demonstrate the effects.