esy icon indicating copy to clipboard operation
esy copied to clipboard

esy isn't able to run a pre-1.0.0 binary when trying to fetch it using "*"

Open shubhamkumar13 opened this issue 2 years ago • 0 comments

Esy version: 0.7.2 Operating System: Ubuntu 22.04.3 LTS x86_64

Issue: When trying to install runtime_events_tools I am unable to run esy olly --help like a cli tool something like esy dune --help when I version it with a *. But it seems to work fine when I specify the version of the runtime_events_tools in the package.json config. I suspect this is because it is a pre-1.0.0 version of the binary.

Package.json

{
    "dependencies": {
        "ocaml": "5.1.x",
        "@opam/minttea": "*"
    },
    "devDependencies": {
        "@opam/dot-merlin-reader": "*",
        "@opam/ocamlformat": "*",
        "@opam/ocaml-lsp-server": "*",
        "@opam/runtime_events_tools": "*"
    }
}

Actual behavior:

❯ esy olly --help
error: unable to resolve command: olly

esy: exiting due to errors above

Expected behavior:

✦ ❯ esy olly --help
OLLY(1)                           Olly Manual                          OLLY(1)



NAME
       olly - An observability tool for OCaml programs

SYNOPSIS
       olly COMMAND …

COMMANDS
       gc-stats [--json] [--output=output] [OPTION]… EXECUTABLE
           Report the GC latency profile and stats.

       help [--man-format=FMT] [OPTION]… [TOPIC]
           Display help about olly and olly commands.

       trace [--format=format] [OPTION]… TRACEFILE EXECUTABLE
           Save the runtime trace to file.

COMMON OPTIONS
       --help[=FMT] (default=auto)
           Show this help in format FMT. The value FMT must be one of auto,
           pager, groff or plain. With auto, the format is pager or plain
           whenever the TERM env var is dumb or undefined.

EXIT STATUS
       olly exits with:

       0   on success.

       123 on indiscriminate errors reported on standard error.

       124 on command line parsing errors.

       125 on unexpected internal errors (bugs).



Olly                                                                   OLLY(1)

Additional steps to reproduce: Step 1 : mkdir temp-dir && cd temp-dir Step 2 : Copy the .json file as package.json inside temp-dir so the file should be <file-path>/temp-dir/package.json Step 3 : run esy and everything installs well without any issues

✦ ❯ esy
info esy 0.7.2 (using package.json)
info checking https://github.com/ocaml/opam-repository for updates...
info checking https://github.com/esy-ocaml/esy-opam-override for updates...
info resolving esy packages: done
info solving esy constraints: done
info resolving npm packages: done
info fetching: done
info installing: done

shubhamkumar13 avatar Mar 11 '24 05:03 shubhamkumar13