Skip to content

Allow to use Patch.patch and Patch.pp_hunk on large diffs with OCaml 4 - #30

Merged
kit-ty-kate merged 5 commits into
hannesm:mainfrom
kit-ty-kate:fix-large-diff-support-ocaml4
Jun 2, 2025
Merged

Allow to use Patch.patch and Patch.pp_hunk on large diffs with OCaml 4#30
kit-ty-kate merged 5 commits into
hannesm:mainfrom
kit-ty-kate:fix-large-diff-support-ocaml4

Conversation

@kit-ty-kate

@kit-ty-kate kit-ty-kate commented May 29, 2025

Copy link
Copy Markdown
Collaborator

Fixes ocaml/opam#6513
Queued on top of #29
Part of the patches are ported from #24

(@) and List.map are not tail-recursive with OCaml < 5.1

TODO: add tests

@kit-ty-kate
kit-ty-kate force-pushed the fix-large-diff-support-ocaml4 branch from 11f7e7a to f859021 Compare June 2, 2025 00:55
kit-ty-kate and others added 5 commits June 2, 2025 01:59
List.map and (@) were not tail-recursive so it would stack overflow
This also allows to use Patch.patch on large diffs when using OCaml 4
as (@)/List.append is not tail-recursive with OCaml 4
@kit-ty-kate
kit-ty-kate force-pushed the fix-large-diff-support-ocaml4 branch from f859021 to 14c6170 Compare June 2, 2025 00:59
@kit-ty-kate kit-ty-kate closed this Jun 2, 2025
@kit-ty-kate kit-ty-kate reopened this Jun 2, 2025
@kit-ty-kate
kit-ty-kate merged commit c1a06e8 into hannesm:main Jun 2, 2025
@kit-ty-kate
kit-ty-kate deleted the fix-large-diff-support-ocaml4 branch June 2, 2025 01:03
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.

Stack overflow while updating repositories

1 participant