Skip to content
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

Fix: distinguish MSYS2 from Cygwin #5404

Merged
merged 3 commits into from
Jan 18, 2023
Merged

Conversation

jonahbeckford
Copy link
Contributor

The original code looked like it had a bad merge at some point in its history (duplicates the if condition):

            if (OpamString.ends_with ~suffix:"cygwin1.dll" tx ||
                OpamString.ends_with ~suffix:"msys-2.0.dll" tx) then
            (* ... *)
            else if OpamString.ends_with ~suffix:"msys-2.0.dll" tx then

Without this PR, MSYS2 uses cp -PRr instead of the intended rsync; rsync is a reasonable fallback for the lack of symlinks in MSYS2, and it copies binaries correctly (ex. if both dune and dune.exe are in the same directory, cp will fail).

The PR does not affect Cygwin which by default uses symlinks.

This PR is the real fix to https://github.com/ocaml/dune/blob/fa3aa2891ac74828a81f73894fe247f69c530c81/ci/build-test.sh#L82-L94 and similar failures.

master_changes.md Outdated Show resolved Hide resolved
@jonahbeckford jonahbeckford marked this pull request as ready for review December 29, 2022 11:44
Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

Thanks! Possible new location for the deleted comment 🙂

src/core/opamStd.ml Show resolved Hide resolved
Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@rjbou rjbou force-pushed the fix-msys2-detect branch from 73c02f2 to 0691cf7 Compare January 7, 2023 12:47
@dra27 dra27 merged commit 9fc4baa into ocaml:master Jan 18, 2023
@rjbou rjbou added this to the 2.2.0~alpha milestone Mar 11, 2023
@dra27 dra27 mentioned this pull request Jun 13, 2024
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.

3 participants