vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.05k stars 1.8k forks source link

Colors are not preserved, code lines are not clickable #8429

Open MickL opened 3 months ago

MickL commented 3 months ago

Verify canary release

Link to code that reproduces this issue

-

What package manager are you using / does the bug impact?

npm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

2.0.3

Describe the Bug

When I run "bun lint" normally I can click the line of code and it jumps into it (using Webstorm). Also the warning is yellow and an error would be red:

338527936-be1c9902-2466-43c3-bfd4-450aea7193da

If I run the same with Turbo (same with ui: "stream") I cant click the line and the color is lost aswell:

338528607-10c68e50-58e2-40cd-8aae-1ffe0b462627

Tested in iTerm and Webstorm

Apperently the colors have been fixed with #223 but maybe since the new UI has landed they are gone again?

Expected Behavior

-

To Reproduce

-

Additional context

No response

jraoult commented 3 months ago

@MickL I've had the same issue with Webstorm. With turbo v1 --log-prefix=none was enough, but with v2 I also have to disable the tui.

So typically for me this allow Webstorm to parse the lines and make them "clickable":

TURBO_UI=0 turbo run lint --log-prefix=none

It is not ideal but it is very convenient in dev.

jskrable commented 3 months ago

@MickL I've had the same issue with Webstorm. With turbo v1 --log-prefix=none was enough, but with v2 I also have to disable the tui.

So typically for me this allow Webstorm to parse the lines and make them "clickable":

TURBO_UI=0 turbo run lint --log-prefix=none

It is not ideal but it is very convenient in dev.

I'm seeing this issue in Warp as well after moving to turbo v2.

natacharome commented 3 months ago
TURBO_UI=0 

Works well for me when lauching build command ! Thanks for the tip

chris-olszewski commented 3 months ago

Can people experiencing this try out 2.0.4-canary.4? chalk depends on some environment variables that weren't being passed through in strict mode. I've added these to the allowlist.

If the issue persists, then please provide the underlying tool you're using along with the values of TERM and COLORTERM in your shell.

jraoult commented 3 months ago

@chris-olszewski just to be clear, because I realise this can be confusing since this issue mentions two problems (that may be unrelated): from my side I can see the colours but the link to the code doesn't work.

With that in mind, I tried 2.0.4-canary.4 and sadly no improvement for me for the linking part.

My env: echo $TERM yields xterm-256color (and no COLORTERM for me).

MickL commented 3 months ago

I tried 2.0.4-canary.4 within Webstorm and I see colors now :) Just lines of code are not clickable still

Bildschirmfoto 2024-06-14 um 14 17 27
nsimonson commented 3 months ago

Workaround that seems to work for me to enable colors is to set FORCE_COLOR. Given the changes to strict mode in v2, you'll need to make sure to add it to globalPassThroughEnv.