Skip to content

[Bug]: Diagnostic message on minified code is too long to be readable #4941

@ansgarprause

Description

@ansgarprause

Reproduction link or steps

https://stackblitz.com/edit/rolldown-rolldown-starter-stackblitz-pnhku2ww

A simple import "peggy"; causes the following diagnostic message.

Use of eval function is strongly discouraged as it poses security risks and may cause issues with minification.

What is expected?

The diagnostic message should take up a limited amount of space, allowing me to see what file caused it and keeping the build output above it visible.

Maybe the diagnostic could show only part of the code when the line is too long.

What is actually happening?

The visible terminal scrollback consists almost entirely of whitespace, followed only by this text.

╰─── Use of `eval` function here.
───╯

It is hard to understand what is happening unless the build output is written to a file.

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @rolldown/browser:  1.0.0-beta.15

Any additional comments?

Side note: It seems like the color escape codes are repeated for each character even though it's mainly the same color. I'm not sure if that is intended.

[38;5;249m!�[0m�[38;5;249mf�[0m�[38;5;249mu�[0m�[38;5;249mn�[0m�[38;5;249mc�[0m�[38;5;249mt�[0m�[38;5;249mi�[0m�[38;5;249mo�[0m�[38;5;249mn�[0m�[38;5;249m(�[0m�[38;5;249me�[0m�[38;5;249m,�[0m�[38;5;249mt�[0m�[38;5;249m)�[0m�[38;5;249m{�[0m�[38;5;249m"�[0m�[38;5;249mo�[0m�[38;5;249mb�[0m�[38;5;249mj�[0m�[38;5;249me�[0m�[38;5;249mc�[0m�[38;5;249mt�[0m�[38;5;249m"�[0m�[38;5;

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions