I created 218 pull requests in 3 days!

Not by hand (thank goodness). I made an elm-review-bot that is designed to run elm-review rules against Elm packages. It is hosted with Lamdera and is 100% written in Elm (the only things that aren’t Elm is a .gitignore and a README.md).

For now it only uses NoUnused.Dependencies. When someone publishes a new version of their package, it checks for unused dependencies in that package and if it finds any, it creates a pull request (here’s an example). This is to help reduce dependency conflicts for the end user*.

Some future things this bot could do are:

  • Fix incorrect Elm version ranges
  • Warn if any dependencies for a package get renamed or removed
  • Make sure that all the types used by exposed functions are also exposed
  • Check for dead links in documentation

In the long term I hope that the compiler will do some of these checks but in the meantime, hopefully this bot can improve the package ecosystem a little bit.

Thank you @jfmengels and @supermario for helping me with elm-review and Lamdera respectively.

*One thing I’m not sure about is if pull requests should be made when there’s only unused test dependencies. Test dependencies don’t affect anyone else but maybe it’s still useful to get rid of the ones you aren’t using? Or maybe it’s just annoying to be bothered with that?

32 Likes

I received one of these PR yesterday on elm-ui-book and was sooo pleased! didn’t think twice “LGTM” (squash and merge) :grin:

thanks for this!

3 Likes

Neat, I would really like something like this, that detects 0.18 code/examples in 0.19 repos.

2 Likes

When I ran the bot against the latest version of all the existing packages (roughly 1300 packages), it failed to parse 14 of them. I think in 5 cases it was because I found bugs in elm-syntax. In the other cases it was because of 0.18 test modules in an 0.19 package. I guess I could generate github issues for those (and also check for 0.18 examples) but it doesn’t seem like it happens so often?

Also got some PRs in the mail. Always pleasant to receive something free AND useful, and coming from elm-review I trust the results more than some of the other auto generated PRs I get from GitHub. Nice idea, thanks for doing it.

2 Likes

Hrm, if I just go by elm-package.json beeing there, it’s way more packages ~139. But some of these might be okay (still very confusing, to have 0.18 sources and 0.19 sources in one library branch)

1 Like

Interesting. The elm-review-bot only checks modules that are in tests/ or are in src/ and are used by the package. I guess it’s possible that there’s 0.18 code living outside of those folders or maybe an 0.18 app is using the same code but the modules happen to be both valid 0.18 and 0.19 code. Or maybe the elm-package.json is the only thing left from the 0.18 package.

abadi199/elm-creditcard/demo/elm-package.json
abadi199/intl-phone-input/styles/elm-package.json
abadi199/intl-phone-input/tests/elm-package.json
abinayasudhir/elm-treeview/examples/elm-package.json
abinayasudhir/elm-treeview/tests/elm-package.json
abinayasudhir/outmessage/examples/intro/elm-package.json
afidegnum/elm-bulmanizer/demo/elm-package.json
ahstro/elm-luhn/tests/elm-package.json
bburdette/typed-collections/elm-package.json
bChiquet/elm-accessors/elm-package.json
bChiquet/elm-accessors/tests/elm-package.json
bigbinary/elm-form-field/examples/elm-package.json
bigbinary/elm-reader/examples/elm-package.json
bigbinary/elm-reader/tests/elm-package.json
billstclair/elm-websocket-framework-server/example/server/elm-package.json
billstclair/elm-websocket-framework/tests/elm-package.json
billstclair/elm-xml-extra/example/elm-package.json
Bractlet/elm-plot/tests/elm-package.json
burnable-tech/elm-ethereum/benchmarks/elm-package.json
burnable-tech/elm-ethereum/examples/complex/elm-package.json
burnable-tech/elm-ethereum/examples/simple/elm-package.json
Cendrb/elm-css/examples/readme/elm-package.json
Cendrb/elm-css/readme-example/elm-package.json
Chadtech/ct-colors/elm-package.json
Chadtech/return/elm-package.json
circuithub/elm-dropdown/examples/elm-package.json
cmditch/elm-ethereum/benchmarks/elm-package.json
correl/elm-paginated/tests/elm-package.json
cultureamp/babel-elm-assets-plugin/elm-package.json
damienklinnert/elm-spinner/elm-package.json
damienklinnert/elm-spinner/example/editor/elm-package.json
damienklinnert/elm-spinner/example/rainbow/elm-package.json
danmarcab/material-icons/elm-package.json
danmarcab/material-icons/tests/elm-package.json
dillonkearns/elm-cli-options-parser/examples/ellie/elm-package.json
dillonkearns/elm-cli-options-parser/tests/elm-package.json
EdutainmentLIVE/elm-dropdown/example/elm-package.json
elm-community/intdict/tests/elm-package.json
elm-community/string-extra/tests/elm-package.json
elm-community/undo-redo/examples/elm-package.json
FabienHenon/elm-infinite-list-view/tests/elm-package.json
fedragon/elm-typed-dropdown/examples/elm-package.json
folkertdev/svg-path-lowlevel/tests/elm-package.json
Garados007/elm-svg-parser/tests/elm-package.json
gribouille/elm-treeview/elm-package.json
hecrj/elm-slug/tests/elm-package.json
hercules-ci/elm-dropdown/examples/elm-package.json
humio/elm-dashboard/tests/elm-package.json
ianmackenzie/elm-triangular-mesh/doc/elm-package.json
indicatrix/elm-input-extra/demo/elm-package.json
indicatrix/elm-input-extra/tests/elm-package.json
jamesmacaulay/elm-graphql/example/elm-package.json
jinjor/elm-xml-parser/docs/elm-package.json
jjant/elm-comonad-zipper/examples/elm-package.json
jjant/elm-comonad-zipper/tests/elm-package.json
jjant/elm-dict/tests/elm-package.json
joshforisha/elm-inflect/benchmarks/elm-package.json
joshforisha/elm-inflect/tests/elm-package.json
jouderianjr/elm-dialog/test/elm-package.json
json-tools/json-schema/tests/elm-package.json
json-tools/json-value/demo/elm-package.json
kirchner/elm-selectize/benchmarks/elm-package.json
kirchner/elm-selectize/tests/elm-package.json
krisajenkins/elm-astar/elm-package.json
krisajenkins/elm-astar/test/elm-package.json
krisajenkins/elm-exts/elm-package.json
ktonon/elm-crypto/demo/elm-package.json
lauber00/line-charts/tests/elm-package.json
ljuglaret/fraction/src/elm-package.json
matheus23/elm-figma-api/examples/swatches/elm-package.json
MattCheely/tryframe-coordinator/elm-package.json
MattCheely/tryframe-coordinator/js/iframe-coordinator/elm-package.json
mcordova47/elm-natural-ordering/examples/elm-package.json
mdgriffith/elm-style-animation/tests/elm-package.json
mdgriffith/stylish-elephants/benchmarks/elm-package.json
mdgriffith/stylish-elephants/tests/suite/elm-package.json
mgold/elm-nonempty-list/elm-package.json
mikaxyz/elm-cropper/tests/elm-package.json
miyamoen/tree-with-zipper/examples/elm-package.json
mosmos21/elm-todo/elm-package.json
noahzgordon/elm-jsonapi/example/elm-package.json
noahzgordon/elm-jsonapi/tests/elm-package.json
NoRedInk/elm-debug-controls-without-datepicker/elm-package.json
NoRedInk/elm-debug-controls-without-datepicker/examples/elm-package.json
NoRedInk/elm-plot-rouge/elm-package.json
NoRedInk/elm-plot-rouge/tests/elm-package.json
NoRedInk/elm-sortable-table/elm-package.json
NoRedInk/elm-sortable-table/examples/elm-package.json
norpan/elm-html5-drag-drop/elm-package.json
nphollon/geo3d/tests/elm-package.json
ohanhi/lorem/tests/elm-package.json
Orasund/elm-cellautomata/elm-package.json
pablen/toasty/tests/elm-package.json
pablohirafuji/elm-markdown/bench/0.18/elm-package.json
pastelInc/elm-validator/elm-package.json
pastelInc/elm-validator/tests/elm-package.json
peterszerzo/line-charts/tests/elm-package.json
proda-ai/elm-css/examples/readme/elm-package.json
proda-ai/elm-svg-loader/elm-package.json
proda-ai/elm-svg-loader/example/elm-package.json
prozacchiwawa/elm-keccak/benchmarks/elm-package.json
rix501/elm-sortable-table/elm-package.json
rix501/elm-sortable-table/examples/elm-package.json
rl-king/elm-gallery/tests/elm-package.json
rluiten/sparsevector/elm-package.json
rluiten/stemmer/tests/elm-package.json
RomanErnst/erl/tests/elm-package.json
rtfeldman/count/tests/elm-package.json
rtfeldman/elm-css/examples/readme/elm-package.json
rtfeldman/elm-hex/tests/elm-package.json
rtfeldman/elm-spa-example/tests/elm-package.json
rtfeldman/elm-validate/elm-package.json
rtfeldman/elm-validate/examples/elm-package.json
rtfeldman/elm-validate/tests/elm-package.json
savardd/elm-time-travel/demo/elm-package.json
savardd/elm-time-travel/tests/elm-package.json
sh4r3m4n/elm-piano/elm-package.json
simonh1000/elm-jwt/elm-package.json
stil4m/structured-writer/tests/elm-package.json
StoatPower/elm-wkt/tests/elm-package.json
stoeffel/resetable/tests/elm-package.json
surprisetalk/elm-bulma/demo/elm-package.json
thaterikperson/elm-strftime/elm-package.json
thaterikperson/elm-strftime/tests/elm-package.json
the-sett/ai-search/example/elm-package.json
the-sett/elm-string-case/tests/elm-package.json
ThinkAlexandria/css-in-elm/examples/generated-classes/css/elm-package.json
ThinkAlexandria/css-in-elm/examples/generated-classes/elm-package.json
ThinkAlexandria/css-in-elm/readme-example/elm-package.json
ThinkAlexandria/elm-html-in-elm/tests/elm-package.json
tortus/elm-array-2d/tests/elm-package.json
turboMaCk/elm-continue/tests/elm-package.json
webbhuset/elm-json-decode/elm-package.json
whage/elm-validate/elm-package.json
whage/elm-validate/examples/elm-package.json
whage/elm-validate/tests/elm-package.json
zwilias/elm-holey-zipper/tests/elm-package.json
zwilias/elm-rosetree/elm-package.json

Cool, I’ll add that to the list of things to potentially check for.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.