elm-lang / elm-package

Command line tool to share Elm libraries
BSD 3-Clause "New" or "Revised" License
213 stars 66 forks source link

Versioned ~/.elm #206

Closed ccapndave closed 8 years ago

ccapndave commented 8 years ago

PROBLEM I have one project in 0.16 which I am not going to be able to update for a while, but which I need to maintain and add some features to. Therefore it would be very helpful if I could have both versions installed at once.

Since they are/will be both available on npm, this should just be a case of installing using npm install, adding naive pointers in the scripts element of package.json:

{
  "scripts": {
    "elm-make": "elm-make",
    "elm-package": "elm-package"
  }
},

... and then running the tools using npm (e.g. npm run -- elm-make ..., npm run -- elm-package ...).

I think the thing that will stop this from working is the fact that both versions of Elm want to control ~/.elm.

PROPOSAL As a simple fix I propose that from 0.17 onwards Elm writes whatever it wants to write in a folder with its current version number, so ~/.elm/0.17/..., ~/.elm/0.18, etc. That way everyone can live in harmony, and we don't even need to change 0.16 (that's the exception that lives in the root of the folder).