Quick Summary: I want a way to install a package knowing only its major version like elm install author/package@2.
This is a proposal that is an addition to the proposals to install specific versions of a package (that I'm sure exists somewhere).
This is a feature request for when the package installer becomes the next focus. I imagine that when that is released elm-json would become obsolete and that elm becomes the only tool that users will have to use. This proposal aims to indicate some use-cases that elm-json currently fills for tooling purposes, so that they also be included and that batch of work.
Use-case
While this could potentially be useful for Elm developers when they want to use the latest version of an outdated major version of a package, this would mostly be for tooling.
This behavior currently exists in elm-json, and elm-review depends on it. I'll explain the process for the latter.
elm-review takes the user's configuration, which is an Elm application with configuration as Elm code, and a list of elm-review packages as dependencies (and maybe other Elm packages if they wrote custom rules).
It then
creates a temporary application folder
copies the elm.json
changes the source-directories from the original elm.json to point to the correct location
adds the source-directory for the elm-review that contains the main application logic to the source-directories
Changes the dependencies to include the ones that the main application logic requires
The last step is done using elm-json install stil4m/elm-syntax@7 <and a couple more...>.
The dependencies are added so that users don't have to do so themselves and get a hard to understand error when they forget to do so.
The reason for indicating the major version is that if one of these packages releases a new major version incompatible with the previous major version, we don't force the latest major version and cause all current elm-review configuration to become un-compilable and un-runnable.
In practice, elm-review doesn't run elm-json install stil4m/elm-syntax@7 ... (at least for this), but instead elm-json solve stil4m/elm-syntax@7 ... <path-to-original-elm.json> which allows getting (and caching) the list of dependencies so that we don't have to write the elm.json file and then run elm-json install ... in a second step.
elm-review still uses install with the major version constraint when initializing a new configuration. To avoid asking the user to confirm the install prompt, elm-json installsupports a --yes flag.
Summary of requests
Support a way to constrain a package to a major version
Add a --yes option to the install command (or similar)
(Potentially?) Support a way to compute dependencies without installing them directly like elm-json solve.
Quick Summary: I want a way to install a package knowing only its major version like
elm install author/package@2
.This is a proposal that is an addition to the proposals to install specific versions of a package (that I'm sure exists somewhere).
This is a feature request for when the package installer becomes the next focus. I imagine that when that is released
elm-json
would become obsolete and thatelm
becomes the only tool that users will have to use. This proposal aims to indicate some use-cases thatelm-json
currently fills for tooling purposes, so that they also be included and that batch of work.Use-case
While this could potentially be useful for Elm developers when they want to use the latest version of an outdated major version of a package, this would mostly be for tooling.
This behavior currently exists in
elm-json
, andelm-review
depends on it. I'll explain the process for the latter.elm-review
takes the user's configuration, which is an Elm application with configuration as Elm code, and a list ofelm-review
packages as dependencies (and maybe other Elm packages if they wrote custom rules).It then
elm.json
elm.json
to point to the correct locationelm-review
that contains themain
application logic to the source-directoriesThe last step is done using
elm-json install stil4m/elm-syntax@7 <and a couple more...>
.The dependencies are added so that users don't have to do so themselves and get a hard to understand error when they forget to do so.
The reason for indicating the major version is that if one of these packages releases a new major version incompatible with the previous major version, we don't force the latest major version and cause all current
elm-review
configuration to become un-compilable and un-runnable.In practice,
elm-review
doesn't runelm-json install stil4m/elm-syntax@7 ...
(at least for this), but insteadelm-json solve stil4m/elm-syntax@7 ... <path-to-original-elm.json>
which allows getting (and caching) the list of dependencies so that we don't have to write theelm.json
file and then runelm-json install ...
in a second step.elm-review
still usesinstall
with the major version constraint when initializing a new configuration. To avoid asking the user to confirm theinstall
prompt,elm-json install
supports a--yes
flag.Summary of requests
--yes
option to theinstall
command (or similar)elm-json solve
.