dylan-lang / deft

The Dylan CLI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need better error message for conflicting dependencies

cgay opened this issue · comments

This is a terrible error message:

19:51:50 ~/dylan/workspaces/dylox (main*) 
$ deft-app --verbose update
Loading /Users/cgay/dylan/_packages/pacman-catalog/master/src/v1/st/ri/strings
Loading /Users/cgay/dylan/_packages/pacman-catalog/master/src/v1/un/co/uncommon-dylan
Loading /Users/cgay/dylan/_packages/pacman-catalog/master/src/v1/te/st/testworks
Loading /Users/cgay/dylan/_packages/pacman-catalog/master/src/v1/co/mm/command-line-parser
Loading /Users/cgay/dylan/_packages/pacman-catalog/master/src/v1/js/on/json
dependencies on conflicting major versions of the same package: "strings@2.0.1" and "strings@1.1.0" (path: strings)

It needs to say what packages are requiring different major versions of the strings package.

These are the current "dylox" dependencies:

    "dependencies": [
        "strings",
        "uncommon-dylan"
    ],
    "dev-dependencies": [
        "testworks"
    ],

dylox requires "strings" (i.e., strings@latest, i.e., strings@2.0.1) and testworks requires strings@1.1, so a better message would be:

dependencies on conflicting major versions of the same package: "strings@2.0.1" (via dylox) and "strings@1.1.0" (via testworks).

Not sure what "(path: strings)" is about.

I can imagine solving this by simply (!) taking the non-dev dependency (strings@2.x) and continuing without a fatal error, because dev deps should never change how the main code is built, but I don't like that solution because it just defers the problem. Better to die horribly and force the programmer to update dev deps to something compatible.