elm-json
elm-json copied to clipboard
thread 'main' panicked at 'IndexMap: key not found with `elm-json upgrade --unsafe`
I get the following error when running elm-json upgrade --unsafe with my elm.json:
$ elm-json upgrade --unsafe
thread 'main' panicked at 'IndexMap: key not found', /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/indexmap-1.0.2/src/map.rs:1654:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
This is with version 0.2.6:
$ elm-json --version
elm-json 0.2.6
This can be reproduced with the following elm.json, note that it works correctly without the --unsafe:
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"Chadtech/elm-bool-extra": "2.4.0",
"Garados007/elm-svg-parser": "1.0.0",
"NoRedInk/elm-compare": "2.0.0",
"NoRedInk/elm-random-pcg-extended": "1.0.0",
"NoRedInk/elm-uuid": "2.0.0",
"Skinney/murmur3": "2.0.8",
"avh4/elm-color": "1.0.0",
"cuducos/elm-format-number": "7.0.0",
"dillonkearns/elm-graphql": "4.5.0",
"dmy/elm-pratt-parser": "2.0.0",
"elm/browser": "1.0.2",
"elm/bytes": "1.0.8",
"elm/core": "1.0.4",
"elm/file": "1.0.5",
"elm/html": "1.0.0",
"elm/http": "2.0.0",
"elm/json": "1.1.3",
"elm/parser": "1.1.0",
"elm/svg": "1.0.1",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm-community/basics-extra": "4.0.0",
"elm-community/dict-extra": "2.4.0",
"elm-community/json-extra": "4.2.0",
"elm-community/list-extra": "8.2.2",
"elm-community/maybe-extra": "5.1.0",
"elm-community/string-extra": "4.0.1",
"folkertdev/one-true-path-experiment": "4.0.3",
"gampleman/elm-visualization": "2.0.1",
"justinmimbs/date": "3.2.0",
"justinmimbs/time-extra": "1.1.0",
"justinmimbs/timezone-data": "2.1.4",
"mdgriffith/elm-ui": "1.1.0",
"newmana/chroma-elm": "16.0.3",
"rtfeldman/elm-hex": "1.0.0",
"rtfeldman/elm-iso8601-date-strings": "1.1.3",
"ryannhg/date-format": "2.3.0"
},
"indirect": {
"NoRedInk/elm-random-general": "1.0.0",
"andre-dietrich/parser-combinators": "3.2.0",
"elm/random": "1.0.0",
"elm/regex": "1.0.0",
"elm/virtual-dom": "1.0.2",
"folkertdev/elm-deque": "3.0.1",
"folkertdev/svg-path-lowlevel": "3.0.0",
"ianmackenzie/elm-float-extra": "1.1.0",
"ianmackenzie/elm-geometry": "1.2.1",
"ianmackenzie/elm-interval": "1.0.1",
"ianmackenzie/elm-triangular-mesh": "1.0.3",
"lukewestby/elm-string-interpolate": "1.0.4",
"mgold/elm-nonempty-list": "4.0.2",
"myrho/elm-round": "1.0.4",
"pilatch/flip": "1.0.0"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "1.2.2"
},
"indirect": {}
}
}
Running with RUST_BACKTRACE does not give much more information:
$ RUST_BACKTRACE=1 elm-json upgrade --unsafe
thread 'main' panicked at 'IndexMap: key not found', /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/indexmap-1.0.2/src/map.rs:1654:13
stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
$ RUST_BACKTRACE=full elm-json upgrade --unsafe
thread 'main' panicked at 'IndexMap: key not found', /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/indexmap-1.0.2/src/map.rs:1654:13
stack backtrace:
0: 0x578dee - <unknown>
1: 0x49f49c - <unknown>
2: 0x578476 - <unknown>
3: 0x578157 - <unknown>
4: 0x577a90 - <unknown>
5: 0x4e6764 - <unknown>
6: 0x52ae42 - <unknown>
7: 0x51ffd6 - <unknown>
8: 0x4b6d21 - <unknown>
9: 0x4bcab3 - <unknown>
10: 0x4a9a3a - <unknown>
The binaries get stripped before deployment which is why you do not see any backtrace info.
Backtrace should be more informative if you ran with a locally built version of elm-json.
Minimal repro (just so I don't forget about this)
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"folkertdev/one-true-path-experiment": "4.0.3",
"gampleman/elm-visualization": "2.0.1"
},
"indirect": {}
},
"test-dependencies": {
"direct": {},
"indirect": {}
}
}