panosoft/elm-grove

Don't validate package.json when project doesn't use native modules

robinheghan opened this issue · 3 comments

Hi.

I'm maintaining several Elm packages, and lately I've been getting PRs and bug reports because Grove fails to work with my packages. The reason why, is that my packages fail Grove's package.json validation.

While fairly easy to fix (version number mismatch, and name mismatch), I don't understand why it's something that needs fixing. Here's why: package.json is in my project purely for making testing the library easier. It has no impact on the actual Elm code.

This is true for several projects. It's relatively common to place elm-verify-examples, elm-test or elm in the package.json to make development easier. But it has no effect on the actual library itself.

As a result, there are several packages which cannot be installed by Grove. Like elm-community/dict-extra and Skinney/murmur3. If I understand it correctly, even packages which use such libraries cannot be installed with grove (which is why I'm receiving bug reports).

My naive suggestion is to disable package.json verification if the native-modules flag is missing or set to false in elm-package.json, as that makes it very unlikely that the package.json is important for the function of that library.

I too received a bug report regarding this. If you look at the end of the thread in an unrelated issue #9 you'll see my response to the unofficial report of this issue.

Right now I'm using assuming if you have dependencies then you package needs the package.json. If you only need it for tests, why not put it in devDependencies?

Your idea to use native-modules was a good one.

Fixed in release 1.2.0.