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

Use normal codepath for win32 #333

Merged
merged 4 commits into from
Jun 20, 2024
Merged

Use normal codepath for win32 #333

merged 4 commits into from
Jun 20, 2024

Conversation

hhugo
Copy link
Collaborator

@hhugo hhugo commented May 29, 2024

The PR removes the "degraded" code path when Sys.win32 is true.

It goes in the direction of #330 but leaves a bunch of diffs out for now.

  • It doesn't normalize path '/' vs \
  • It doesn't search for a shell (bash.exe, dash.exe, sh.exe) and unconditionally uses bash.
  • It doesn't protect against command line length limit
  • It doesn't contain the following "fix" (not sure what the bug is ...)
let prep_windows_cmd cmd =
  (* workaround known ocaml bug, remove later *)
  if String.contains cmd '\t' && String.contains cmd ' ' = false then
    " " ^ cmd
  else
    cmd

@hhugo
Copy link
Collaborator Author

hhugo commented Jun 14, 2024

One should probably wait for #336 before merging so that we can see that it works without any hacks from the sunset repo.

@hhugo
Copy link
Collaborator Author

hhugo commented Jun 20, 2024

I've merged #330, this is now ready for review. cc @kit-ty-kate @gasche

Copy link
Member

@kit-ty-kate kit-ty-kate left a comment

Choose a reason for hiding this comment

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

apart from the couple of comments below that looks fine to me

src/ocamlbuild_executor.ml Outdated Show resolved Hide resolved
src/shell.ml Outdated Show resolved Hide resolved
@hhugo hhugo merged commit da58f62 into ocaml:master Jun 20, 2024
15 checks passed
@hhugo hhugo deleted the normal branch June 20, 2024 11:39
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.

2 participants