elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.51k stars 656 forks source link

Prevent publishing packages with unused dependencies #2220

Open jfmengels opened 3 years ago

jfmengels commented 3 years ago

Quick Summary: Some packages are published with unused dependencies.

A dependency can create lock-in of another dependency' version, and therefore unused dependencies can unnecessarily prevent two packages from being used together.

Example:

In this situation, package A is actively preventing package B from being added to a project.

I believe it would be beneficial if the compiler prevented the publication of packages with these issues.

SSCCE

Take any existing package and make it depend on a new dependency, then try to publish it.

Additional Details

There's an elm-review rule to detect unused dependencies on a package (and application).

A few months ago, @MartinSStewart created a bot to create pull requests to fix this issue, and summarized his work in this Discourse post

github-actions[bot] commented 3 years ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.