gren-lang / gren-lang/compiler

Output to STDOUT blocks reporting to STDERR

Open
#388 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Given a Gren file with a known compilation issue like so:

module Broken exposing (..)

main =
    Html.text "Hello"

If I compile this module with output to a file, compilation errors are reported to STDERR:

$ gren make Broken --output=broken.js --report=json 2> errors.json
$ cat errors.json | jq
{
  "type": "compile-errors",
  "errors": [
    {
      "path":
# etc...

But if I redirect the output to STDOUT, reporting on STDERR disappears.

$ gren make Broken --output=/dev/stdout --report=json 2> errors.json
$ cat errors.json
# file is empty

Gren version 0.6.6 on Linux.

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

No source file or test is named. Start by reproducing both gren make commands from the issue on Linux, then trace how --output=/dev/stdout affects compilation errors and --report=json output. Done means JSON compilation errors are still written to STDERR when compiler output is sent to STDOUT.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli, compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.