-
Notifications
You must be signed in to change notification settings - Fork 407
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
pkg: ocamlformat dev tool requires lockdir #11049
base: main
Are you sure you want to change the base?
Conversation
This is a workaround for an issue where dune needs to locate an ocaml toolchain in order to run `dune fmt`, and in the absence of a lockdir dune will look in PATH for ocaml tools, which may not be present. The consequence of this issue is that users of the developer preview can have an ocaml toolchain installed by dune (in their ~/.cache/dune/toolchains directory), and running `dune fmt` will complain about `ocamlc` not being found. Forcing the lockdir to exist means that dune will always take the toolchain implied by the lockdir, and there won't be a situation where the command fails due to `ocamlc` being missing. More info in this issue: ocaml#11038 Signed-off-by: Stephen Sherratt <[email protected]>
I was little bit surprise that ocamlformat doesn't depends on toolchains, in my mind all the dev-tools depends on toolchains. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some typos. Would it be better to have a test case where ocaml doesn't exist inside the lock-dir ?
The project depends on ocaml, so provide a fake ocaml package: | ||
$ make_ocaml_opam_pkg | ||
|
||
The ocamlformat dev tool requires the project ot be locked: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ocamlformat dev tool requires the project ot be locked: | |
The ocamlformat dev tool requires the project to be locked: |
The project depends on ocaml, so provide a fake ocaml package: | ||
$ make_ocaml_opam_pkg | ||
|
||
The ocamlformat dev tool requires the project ot be locked: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ocamlformat dev tool requires the project ot be locked: | |
The ocamlformat dev tool requires the project to be locked: |
The project depends on ocaml, so provide a fake ocaml package: | ||
$ make_ocaml_opam_pkg | ||
|
||
The ocamlformat dev tool requires the project ot be locked: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ocamlformat dev tool requires the project ot be locked: | |
The ocamlformat dev tool requires the project to be locked: |
The project depends on ocaml, so provide a fake ocaml package: | ||
$ make_ocaml_opam_pkg | ||
|
||
The ocamlformat dev tool requires the project ot be locked: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ocamlformat dev tool requires the project ot be locked: | |
The ocamlformat dev tool requires the project to be locked: |
The project depends on ocaml, so provide a fake ocaml package: | ||
$ make_ocaml_opam_pkg | ||
|
||
The ocamlformat dev tool requires the project ot be locked: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ocamlformat dev tool requires the project ot be locked: | |
The ocamlformat dev tool requires the project to be locked: |
The project depends on ocaml, so provide a fake ocaml package: | ||
$ make_ocaml_opam_pkg | ||
|
||
The ocamlformat dev tool requires the project ot be locked: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ocamlformat dev tool requires the project ot be locked: | |
The ocamlformat dev tool requires the project to be locked: |
The project depends on ocaml, so provide a fake ocaml package: | ||
$ make_ocaml_opam_pkg | ||
|
||
The ocamlformat dev tool requires the project ot be locked: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ocamlformat dev tool requires the project ot be locked: | |
The ocamlformat dev tool requires the project to be locked: |
The project depends on ocaml, so provide a fake ocaml package: | ||
$ make_ocaml_opam_pkg | ||
|
||
The ocamlformat dev tool requires the project ot be locked: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ocamlformat dev tool requires the project ot be locked: | |
The ocamlformat dev tool requires the project to be locked: |
This is a workaround for an issue where dune needs to locate an ocaml toolchain in order to run
dune fmt
, and in the absence of a lockdir dune will look in PATH for ocaml tools, which may not be present. The consequence of this issue is that users of the developer preview can have an ocaml toolchain installed by dune (in their ~/.cache/dune/toolchains directory), and runningdune fmt
will complain aboutocamlc
not being found. Forcing the lockdir to exist means that dune will always take the toolchain implied by the lockdir, and there won't be a situation where the command fails due toocamlc
being missing.More info in this issue:
#11038