Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

elm-package doesn't install a seemingly valid elm-package.json dependencies #274

Open
n1k0 opened this issue May 25, 2017 · 7 comments
Open

Comments

@n1k0
Copy link

n1k0 commented May 25, 2017

Using elm 0.18.0 installed from npm, using node v7.8.0 and npm v4.6.1.

In a new empty tmp directory, create a elm-package.json file with this content:

{
    "version": "1.0.0",
    "summary": "Bug reproduction",
    "repository": "https://github.com/foo/bar.git",
    "license": "MIT",
    "source-directories": ["."],
    "exposed-modules": [],
    "dependencies": {
      "elm-lang/core": "5.1.1 <= v < 6.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}

Install:

$ elm-package install
Packages configured successfully!

Now look at the content of elm-stuff:

$ tree elm-stuff
elm-stuff
├── exact-dependencies.json
└── packages

1 directory, 1 file

Looks fine, right? Now inspect the packages folder, it's empty. And exact-dependencies.json exposes an empty object:

$ cat elm-stuff/exact-dependencies.json
{}%      

This started happening this morning after strange failures on Travis for the tooty project, where the test env couldn't be installed at all. I reduced the problem to the setup exposed above, which fails both on my machine and Travis.

I don't have a clue what triggered this behavior change, I didn't install anything new, yesterday everything was fine. Very, very strange.

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@n1k0
Copy link
Author

n1k0 commented May 25, 2017

FWIW package.elm-lang.org is currently down http://downforeveryoneorjustme.com/http://package.elm-lang.org

@renatomassaro
Copy link

I think I've hit the same issue, and the package server is up.

To replicate:

{
    "version": "1.0.0",
    "summary": "Sample Elm Test",
    "repository": "https://github.com/user/project.git",
    "license": "BSD-3-Clause",
    "source-directories": [
        "."
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-community/elm-test": "4.0.0 <= v < 5.0.0",
        "rtfeldman/node-test-runner": "4.0.0 <= v < 5.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}

does not install anything but says it was successful, while just changing the versions

    "dependencies": {
        "elm-community/elm-test": "3.0.0 <= v < 4.0.0",
        "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0"
    },

will return a valid upgrade plan. Weird.

@tdrach
Copy link

tdrach commented Aug 29, 2017

I'm seeing the same issues as above. Run: elm package install and see Packages configured successfully! as a response, but then see an empty packages directory. elm-package.json shown below:

{
    "version": "0.5.0",
    "summary": "XX",
    "repository": "XX",
    "license": "BSD3",
    "source-directories": [
        "./src"
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-lang/core": "5.1.1 <= v < 6.0.0",
        "elm-lang/html": "2.0.0 <= v < 3.0.0",
        "elm-lang/http": "3.0.1 <= v < 4.0.0",
        "simonh1000/elm-jwt": "5.2.1 <= v < 6.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.18.1"
}

@ringvold
Copy link

ringvold commented Nov 7, 2017

I'm experiencing the same issue, but only on windows it seems. I do not have the same problem on OSX.

@ringvold
Copy link

ringvold commented Nov 7, 2017

Sooo...I got it working by deleting the tests folder and reinitializing with elm-test init. 🤔

@effervescentia
Copy link

I found that it seems to happen while there is an exact-dependencies.json file in the elm-stuff folder, removing it caused the install to prompt me for install again
I had previously been committing it to git to preserve the resolved versions exactly, I suppose I will be removing it now though in order to allow for CI's to build my project

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants