gren-lang / gren-lang/compiler

Haskell-based compiler 0.6.5 crashes when compiling a package that has a summary field >= 80 chars

Open
#380 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue help wanted
Dominant language
Haskell
Stars
503
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Example:

{
    "type": "package",
    "platform": "common",
    "name": "example/package",
    "license": "BSD-3-Clause",
    "summary": "this summary line is not that long... but it is longer than expected at 80 chars",
    "source-directories": [
        "src"
    ],
    "version": "1.0.0",
    "exposed-modules": [
            "Main"
    ],
    "gren-version": "0.6.0 <= v < 0.7.0",
    "dependencies": {
        "gren-lang/core": "7.4.0 <= v < 8.0.0"
    }
}

"gren make" produces:

gren: DecodeProblem "{\"command\":\"make\",\"optimize\":false,\"sourcemap .... 
<snipped>

\"summary\":\"this summary line is not that long... but it is longer than expected at 80 chars\"
<snipped>

(Field "project-outline" (Field "summary" (Failure (Region (Position 1 266) (Position 1 348)) InvalidInput)))
CallStack (from HasCallStack):  error, called at terminal/Main.hs:30:13 in gren-0.6.5-inplace-gren:Main
HasCallStack backtrace:
  collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
  toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:204:5 in ghc-internal:GHC.Internal.Exception  error, called at terminal/Main.hs:30:13 in gren-0.6.5-inplace-gren:Main

Example project is in this git repo: https://github.com/gilramir/gren-bug-reports

$ cd 2026-06-28-summary
$ gren make

If the summary field is 79 characters, it's fine.
This doesn't crash for gren.json type "application", I guess because "summary" isn't used then; it must only be used for "package" types.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash with gren make in the linked gren-bug-reports example project, using the package summary lengths described in the report. Start from the reported failure at terminal/Main.hs:30:13 and the summary decoding path. Done means package summaries at or above 80 characters no longer crash, while the existing 79-character case continues to work.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.