Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pietro909
Last active March 29, 2019 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pietro909/e5707e40163fcf9e615d2d812c36821b to your computer and use it in GitHub Desktop.
Save pietro909/e5707e40163fcf9e615d2d812c36821b to your computer and use it in GitHub Desktop.
Elm 0.18 vs 0.19 - compile time

Elm 0.18 with debug

$ time ./node_modules/.bin/elm-make src/Main.elm --output dist/index.js --debug Success! Compiled 219 modules. Successfully generated dist/index.js ./node_modules/.bin/elm-make src/Main.elm --output dist/index.js --debug 173.55s user 40.82s system 160% cpu 2:13.39 total

Elm 0.18

$ time ./node_modules/.bin/elm-make src/Main.elm --output dist/index.js Success! Compiled 219 modules. Successfully generated dist/index.js ./node_modules/.bin/elm-make src/Main.elm --output dist/index.js 181.02s user 42.25s system 139% cpu 2:40.01 total

Automagic upgrade

$ cat elm-upgrade-2019-03-26T162038.245Z.log INFO: Found elm at /Users/pietrograndi/.nvm/versions/node/v8.11.3/bin/elm INFO: Found elm 0.19.0 INFO: Found elm-format at /Users/pietrograndi/.nvm/versions/node/v8.11.3/bin/elm-format INFO: Found elm-format 0.8.1 INFO: Cleaning ./elm-stuff before upgrading INFO: Converting elm-package.json -> elm.json INFO: Detected an application project (this project has no exposed modules) INFO: Switching from NoRedInk/elm-decode-pipeline (deprecated) to NoRedInk/elm-json-decode-pipeline INFO: Installing latest version of NoRedInk/elm-json-decode-pipeline INFO: Switching from elm-community/elm-test (deprecated) to elm-explorations/test INFO: Installing latest version of elm-explorations/test INFO: Installing latest version of elm-community/json-extra INFO: Installing latest version of elm-community/list-extra INFO: Installing latest version of elm-community/maybe-extra INFO: Installing latest version of elm-community/result-extra INFO: Installing latest version of elm-community/string-extra INFO: Switching from elm-lang/core (deprecated) to elm/core INFO: Installing latest version of elm/core INFO: Detected use of elm-lang/core#Json.Decode; installing elm/json INFO: Detected use of elm-lang/core#Time; installing elm/time INFO: Detected use of elm-lang/core#Regex; installing elm/regex INFO: Switching from elm-lang/http (deprecated) to elm/http INFO: Installing latest version of elm/http INFO: Installing latest version of simonh1000/elm-jwt INFO: Installing latest version of toastal/either INFO: Upgrading *.elm files in src/

SUCCESS! Your project's dependencies and code have been upgraded. However, your project may not yet compile due to API changes in your dependencies.

See https://github.com/elm/compiler/blob/master/upgrade-docs/0.19.md and the documentation for your dependencies for more information.

Here are some common upgrade steps that you will need to do manually:

  • NoRedInk/elm-json-decode-pipeline
    • Changes uses of Json.Decode.Pipeline.decode to Json.Decode.succeed
  • elm/core
    • Replace uses of toString with String.fromInt, String.fromFloat, or Debug.toString as appropriate
  • undefined

Elm 0.19

$ time ./node_modules/.bin/elm make src/Main.elm --output dist/index.js Dependencies loaded from local cache. Dependencies ready! Success! Compiled 109 modules. ./node_modules/.bin/elm make src/Main.elm --output dist/index.js 6.85s user 0.57s system 90% cpu 8.198 total

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment