ocaml / ocaml/dune

running `dune tools exec <p>` when `p` is not already installed as a dev tool should suggest users run `dune tools install <p>`

Open
#12,975 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dev tools package management
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

Currently it seems to give different kinds of unhelpful errors. E.g.,

dune tools exec ocamlmerlin
  Error: Unable to load the lockdir for the default build context.
  Hint: Try running 'dune pkg lock

from https://github.com/ocaml/dune/pull/12972/changes#diff-8b4458edb3206a9686f140bdca86b4f98a3c0da2117f24fe040c5dab244ad9b0R12-R14

or

Error: No rule found for
default/.pkg/ocaml-compiler.5.4.0-0420973694f2d2cc3f4f0eb8d8d4f8e7/target/cookie
(context _private)
-> required by Computing closure for package "opam-publish"
Error: No rule found for
default/.pkg/ocaml-base-compiler.5.4.0-681abf63cf2fad33dbc8b99448e71adf/target/cookie
(context _private)
<etc.>

when I just tried locally.

Instead, it should say something like

dune tools exec merlin
  Error: The tool merlin is not installed
  Hint: Try 'dune tools install merlin'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the dune tools exec command entry point and reproduce the behavior with a tool that is not installed as a dev tool, such as ocamlmerlin or merlin. Done means the command reports that the tool is not installed and suggests the corresponding dune tools install command instead of emitting unrelated lockdir or build errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.