Opportunity for a better error message when compiling an originally Elm project
Open
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 95
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
User's intent: get Bytes-in-ports working in their Elm (not Lamdera) app
Steps to reproduce:
elm init- make
src/Main.elmbe a port module and contain a Bytes port (eg.port onConnectSuccessful : (Bytes -> msg) -> Sub msg), used insubscriptions. lamdera make src/Main.elm
Expected: a nice error message about lamdera/core and lamdera/codecs missing in elm.json
Actual: a Map.! crash in here (something related to Wire decoders IIRC)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with elm init, a port module using Bytes, and lamdera make src/Main.elm. Start at compiler/src/Generate/JavaScript.hs around line 199 and inspect the failing Wire decoder lookup. Done means the missing lamdera/core and lamdera/codecs entries in elm.json produce a clear error instead of a Map.! crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100