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

opam pin is very slow on windows #6048

Open
hhugo opened this issue Jun 22, 2024 · 4 comments
Open

opam pin is very slow on windows #6048

hhugo opened this issue Jun 22, 2024 · 4 comments
Assignees

Comments

@hhugo
Copy link
Contributor

hhugo commented Jun 22, 2024

opam pin is very slow on windows, are we cloning the entire repo, with all branches ?
It take 1m20 for each package pinned.

Sat, 22 Jun 2024 13:10:59 GMT
Pin local packages
Sat, 22 Jun 2024 13:10:59 GMT
  C:\hostedtoolcache\windows\opam\2.2.0-rc1\x86_64\opam.exe pin --no-action add js_of_ocaml-compiler.dev .
Sat, 22 Jun 2024 13:12:21 GMT
  [js_of_ocaml-compiler.dev] synchronised (file://D:/a/js_of_ocaml/js_of_ocaml)
Sat, 22 Jun 2024 13:12:21 GMT
  js_of_ocaml-compiler is now pinned to git+file://D:/a/js_of_ocaml/js_of_ocaml#HEAD (version dev)
Sat, 22 Jun 2024 13:12:21 GMT
  C:\hostedtoolcache\windows\opam\2.2.0-rc1\x86_64\opam.exe pin --no-action add js_of_ocaml-lwt.dev .
Sat, 22 Jun 2024 13:13:43 GMT
  [js_of_ocaml-lwt.dev] synchronised (file://D:/a/js_of_ocaml/js_of_ocaml)
Sat, 22 Jun 2024 13:13:43 GMT
  js_of_ocaml-lwt is now pinned to git+file://D:/a/js_of_ocaml/js_of_ocaml#HEAD (version dev)
Sat, 22 Jun 2024 13:13:44 GMT
  C:\hostedtoolcache\windows\opam\2.2.0-rc1\x86_64\opam.exe pin --no-action add js_of_ocaml-ppx.dev .
Sat, 22 Jun 2024 13:15:06 GMT
  [js_of_ocaml-ppx.dev] synchronised (file://D:/a/js_of_ocaml/js_of_ocaml)
Sat, 22 Jun 2024 13:15:06 GMT
  js_of_ocaml-ppx is now pinned to git+file://D:/a/js_of_ocaml/js_of_ocaml#HEAD (version dev)
Sat, 22 Jun 2024 13:15:06 GMT
  C:\hostedtoolcache\windows\opam\2.2.0-rc1\x86_64\opam.exe pin --no-action add js_of_ocaml-ppx_deriving_json.dev .
Sat, 22 Jun 2024 13:16:31 GMT
  [js_of_ocaml-ppx_deriving_json.dev] synchronised (file://D:/a/js_of_ocaml/js_of_ocaml)
Sat, 22 Jun 2024 13:16:31 GMT
  js_of_ocaml-ppx_deriving_json is now pinned to git+file://D:/a/js_of_ocaml/js_of_ocaml#HEAD (version dev)
Sat, 22 Jun 2024 13:16:31 GMT
  C:\hostedtoolcache\windows\opam\2.2.0-rc1\x86_64\opam.exe pin --no-action add js_of_ocaml-toplevel.dev .

This is using opam 2.2 rc1

@dra27
Copy link
Member

dra27 commented Jun 24, 2024

Just extraction a clearer repro:

opam pin --no-action add js_of_ocaml-compiler.dev .
opam pin --no-action add js_of_ocaml-lwt.dev .
opam pin --no-action add js_of_ocaml-ppx.dev .
opam pin --no-action add js_of_ocaml-ppx_deriving_json.dev .
opam pin --no-action add js_of_ocaml-toplevel.dev .

@dra27
Copy link
Member

dra27 commented Jun 24, 2024

The issue here is that local Git repos are first rsync'd and this happens for each pin. You'll see if you pin git+https://github.com/ocsigen/js_of_ocaml.git that it's much faster (especially on the subsequent pins, because the commit cache starts to work).

This is related to #5810.

@dra27
Copy link
Member

dra27 commented Jun 24, 2024

(assigning @rjbou, as we can't remember why the rsync has to take place for a Git clone)

@smorimoto
Copy link
Member

It seems to have been caused by Cygwin's local package directory being created in cwd, but setup-ocaml now tells git to ignore it. This should make the pin not very slow.

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

No branches or pull requests

4 participants