As I havn’t yet seen any solution for solving elm.json dependency conflicts, I decided to try creating a small app for this, while waiting for someone else to come up with a proper solution. This is my first Elm app of over 1000 lines, so probably full of bugs.
The app parses given elm.json, then loads information about related packages and their versions, and shows a table of the versions of elm.json and all newer versions, including all indirect packages.
There is no automatic conflict resolution, but user can select versions from table and any dependency conflicts will be listed below. There is also some color coding to help select versions.
Online version: https://www.markuslaire.com/github/elm-dependencies-analyzer/
Source code: https://github.com/malaire/elm-dependencies-analyzer
I havn’t written any manual/help yet, so here are few notes about how this (currently) works:
- Open/paste your elm.json or click “Load Example” to see an example with some conflicts
- Press Analyze to parse JSON and load package information (this can take a moment)
- selected versions have blue background
- versions which are incompatible with selected versions have red background
- when hovering cursor over any version, all versions incompatible with that one have red border
- selected versions can be changed by clicking another version
- checkboxes change which packages are considered direct packages
- when removing direct packages, any indirect packages which aren’t needed anymore will be marked with strikethrough
- if selected versions have conflicts, those are listed below the table
- the selected versions (blue background) don’t have any conflicts here
- three newer versions are incompatible with selected versions
- mouse pointer is over
krisajenkins/remotedata 6.0.1which is incompatible with 7 versions, shown with red border
ps. All HTTP requests go to my php backend which enforces 24 hour caching. So while this app does make quite many requests, they should be cached quite nicely, and don’t cause much load to package.elm-lang.org