Closed jfmengels closed 8 months ago
New and updated dependencies detected. Learn more about Socket for GitHub ↗︎
Packages | Version | New capabilities | Transitives | Size | Publisher |
---|---|---|---|---|---|
elm-solve-deps-wasm | 1.0.2 | None | +0 |
279 kB | mattpiz |
elm-review | 2.10.3...2.11.0-beta.3 | network | +1/-0 |
715 kB | jfmengels |
@jfmengels This is great! I think an option like that might be quite useful and I'd like to hear the comments of others on this. I don't foresee that the build needs to happen ahead of time, but all dependencies would be needed for this offline operation.
@gpampara How do you currently download all dependencies (in CI I mean)?
@jfmengels We use the tool elm2nix to prepare all the dependencies into Nix, but it's essentially means that upon build they are available. This is then used to recreate the ELM_HOME
locally such that when the compiler runs, it's none the wiser about how the dependencies got there and because they are there at the correct versions, compile runs without trying to go online. This would be similar to caching ELM_HOME
on other CI systems (if you squint at it 😄)
Fixes #61 by adding an offline mode Fixes #81 by replacing
elm-json
byelm-solve-deps-wasm
Fixes #51 #137 by removingelm-json
and all the related problemsThis was not as straightforward as I thought, hence the mess of the commit history. Turns out
elm-solve-deps
has a pretty different purpose thanelm-json
, but given enough tricks you can make it do the same thing.Consider how many areas of the tool this change affects (regular review, init, new-package, --template, ...), I'm willing to release this as a beta version so that people can try it out and report problems before we cut a new release.
@gpampara I've added a
--offline
flag. Do you think you need aelm-review build
(name TBD) command to pre-compile the application (intoelm-stuff
+ELM_HOME
) so that you can then run it in--offline
mode in CI?Remaining:
--offline
flag--offline
in review mode--offline
mode and/or dependencies could not be figured out