elm-lang / elm-make

A build tool for Elm projects
BSD 3-Clause "New" or "Revised" License
175 stars 45 forks source link

Using ports without importing Json causes a build failure #127

Closed eeue56 closed 7 years ago

eeue56 commented 7 years ago

Problem

Solution

process-bot commented 7 years ago

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

shamansir commented 7 years ago

IMO it's better to auto-include Json.Decode only when incoming ports are used, decoding JSON is not required in every case. i.e. outgoing ports are not failing with this configuration (port trigger : Bool -> Cmd msg).

pauldijou commented 7 years ago

I didn't see this issue at first, but I wanted to highlight that you have the exact same problem when using flags inside your program for the same reasons (using Json.Decode but not imported). More infos here: https://github.com/elm-lang/elm-make/issues/134

evancz commented 7 years ago

The upcoming code crawls dependencies from main so these should get included. At the very least, the mechanism works different now, so we should test with 0.19 and get it fixed before it goes out.

dkokic commented 6 years ago

Is this project still being maintained? ;-)