Skip to content

feat(pkg): ocaml implementation of dune_patch#14177

Draft
Alizter wants to merge 1 commit intoocaml:mainfrom
Alizter:push-tlqyrstvkrzy
Draft

feat(pkg): ocaml implementation of dune_patch#14177
Alizter wants to merge 1 commit intoocaml:mainfrom
Alizter:push-tlqyrstvkrzy

Conversation

@Alizter
Copy link
Copy Markdown
Collaborator

@Alizter Alizter commented Apr 13, 2026

We vendor hannesm/patch in order to get a portable implementation of our
patch action. This removes the dependency on an external patch/gpatch
binary, making the patch action work reliably across all platforms.

Doing so required patching the vendored library, so we should consider upstreaming this patch.

We also reorganise and extend the test suite for the patch action.
Making sure that we test the more difficult parts of patching with good
coverage.

Comment thread vendor/update-patch.sh
@hannesm
Copy link
Copy Markdown
Member

hannesm commented Apr 13, 2026

Dear @Alizter, thanks for your work on forking/vendoring. Indeed it is a great idea to upstream patches. For this to work nicely, it is best to open a PR at the upstream repository with the patch and test (as I see you have a test that otherwise fails).

@Alizter
Copy link
Copy Markdown
Collaborator Author

Alizter commented Apr 13, 2026

Thanks @hannesm, I plan to do this soon. I just wanted to let both you and @gasche know since @gasche asked about it in #7699. I'll open an issue/PR with the relevant details soon.

Copy link
Copy Markdown
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this library support ed commands? If it doesn't, we should at least have a decent error message for that.

The split between tests and changes isn't done in a way that makes it possible to evaluate whether this changes any semantics.

@Alizter
Copy link
Copy Markdown
Collaborator Author

Alizter commented Apr 13, 2026

The split between tests and changes isn't done in a way that makes it possible to evaluate whether this changes any semantics.

Sorry about that. This will take a little more time to do.

@Alizter Alizter marked this pull request as draft April 13, 2026 22:01
@Alizter Alizter force-pushed the push-tlqyrstvkrzy branch 8 times, most recently from 0dc9f51 to 8b36d80 Compare April 20, 2026 11:29
We vendor hannesm/patch in order to get a portable implementation of our
patch action. This removes the dependency on an external patch/gpatch
binary, making the patch action work reliably across all platforms.

- Fixes ocaml#12232
- Fixes ocaml#7699

We also reorganise and extend the test suite for the patch action.
Making sure that we test the more difficult parts of patching with good
coverage.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter Alizter force-pushed the push-tlqyrstvkrzy branch from 8b36d80 to 6aa4bf2 Compare April 20, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building Opam Packages: Patches [pkg] gpatch vs patch in package management

3 participants