-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse and apply all the unified patch files from opam-repository #22
Conversation
n8ce. would be great to add these patch files as regression tests to the testsuite here (also the contextual diffs). |
Week update: using ocaml/opam#5892 and this PR, only 9 out of the 915 packages with patches differ from GNU patch.
I hope to finish it next week. This will require #19, allowing spaces instead of tabs between the date and the filename in some cases (that's going to be annoying but i have ideas on how to fix it) and allowing contextual diffs. If anyone wants to help this work: The best way to help would be to add patches and expected results to the testsuite. I've done my best to give an example of package failing before succeeding after for most commits. |
7db379a
to
4c6b846
Compare
I'm done i think, there are no differences between the results of the patches applications from opam-repository with GNU patch and with ocaml-patch, except when there are context diffs involved which will now fail. Next i'll do a cleanup, rebase and this should be good to merge and released as an alpha version for further testing during the dev and alpha stages of opam 2.4.0. Once those stages successfully passed i think we should be able to release patch.3.0.0 around mid to late April. |
4c6b846
to
f68daa3
Compare
88247d9
to
06c88d5
Compare
Examples of this behaviour can be seen in configure.diff from stone.0.1
Examples of this behaviour can be seen in easy-format-make.diff from easy-format.1.0.1
…gorithm Examples of this behaviour can be seen in config.patch from afl-persistent.1.4
Examples of this behaviour can be seen in fix_404.patch from bitstring.2.0.4 and unsafe_string.patch from ordma.0.0.5
This follows the GNU patch behaviour, but we're loosing support for filenames containing spaces when parsing busybox diffs.
cfc167d
to
445da59
Compare
I reviewed commit-by-commit, and am happy about your PR. Please feel free to merge & release. |
Thanks for the review! |
In its current state, this PR fixes all parsing error. However some patch files are simply ignored as they use different formats (e.g. contextual diff, which can unfortunately be found in opam-repository)
This will be a draft until i manage to ensure no difference between GNU patch and this version of patch for every packages in opam-repository (this will also require #18)