Here is some weird behavior when we emit to `Conso...
# development
h
Here is some weird behavior when we emit to `Console.stdout`:
Copy code
$ ./pants peek :: > peek.stdout 2> peek.stderr
$ wc -l peek.stdout 
   61755 peek.stdout
$ wc -l peek.stderr
       0 peek.stderr
$ # Makes sense, peek emits to stdout
$
$ ./pants peek :: > peek.stdout 
$ wc -l peek.stdout 
       0 peek.stdout
$ wc -l peek.stderr
       0 peek.stderr
$ # What? Where did the output go?
Bisecting this now
c
Ah, thanks. I noticed that peek output went to stderr the other day, just haven’t gotten around to report it yet.
h
I don’t think it goes to stderr so much as it gets swallowed somehow?
This bisected to e30eaef0d77880b6f06fc8b9d24fec493fbc965a
a dependabot change
I manually confirmed that the problem starts at that commit
c
well, this gives me no output:
Copy code
╰─❯ ./pants peek 3rdparty/python/requirements.txt | jq .
where as this does:
Copy code
╰─❯ ./pants peek 3rdparty/python/requirements.txt 2>&1 | jq .
[
  {
    "address": "3rdparty/python/requirements.txt",
    "target_type": "_generator_sources_helper",
    "dependencies": [],
    "description": null,
    "source_raw": "requirements.txt",
    "sources": [
      "3rdparty/python/requirements.txt"
    ],
    "tags": null
  }
]
h
Yeah but look at my example above where no output at all happens…
Something subtle is going on
1
c
Mm… ok, maybe not exactly the same, but related
indeed, I repro your case too, and if I redirect stderr, I get the peek output on stdout properly
Copy code
╰─❯ ./pants peek 3rdparty/python/requirements.txt 2> /dev/null | jq .
[
  {
    "address": "3rdparty/python/requirements.txt",
    "target_type": "_generator_sources_helper",
    "dependencies": [],
    "description": null,
    "source_raw": "requirements.txt",
    "sources": [
      "3rdparty/python/requirements.txt"
    ],
    "tags": null
  }
]
h
Reverting e30eaef0d77880b6f06fc8b9d24fec493fbc965a fixes this
will try and put a test together
BTW
git bisect run
is magical
✔️ 1
c
agree, I’ve used it once and that was such a joy
c
Glad we found this was real, I thought I had gotten my setup cursed
h