-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalArgumentException: Unknown ansi-escape [2m #46
Comments
Easy workaround for this issue - |
Previously, some error messages might have been not able to be printed due to a bug in fansi com-lihaoyi/fansi#46 Now, we added a workaround that should help out here. Fixes scalameta#730
Previously, some error messages might have been not able to be printed due to a bug in fansi com-lihaoyi/fansi#46 Now, we added a workaround that should help out here. Fixes #730
I got same kind of exception message
when trying to run command I was using Ubuntu 20.04, Ammonite Repl 2.4.0 (Scala 2.12.13 Java 11.0.18) See this how to reproduce the error EDIT: I also tested this with Scala standard REPL and Ammonite REPL Using ammonite REPL command fails
But when using scala REPL command executes without failures
Running the command in Ubuntu MATE terminal the output is
|
`scripts-cli/StatementExecutionZIO.scala` is a working ZIO app that runs under the Scala CLI. It currently executes a query on a Databricks SQL Warehouse and waits for the execution to complete using the Databricks SDK for Java. It is not currently possible to reliably run ZIO via Ammonite (`amm`) due to com-lihaoyi/fansi#46. Fansi chokes when ZIO generates a warning that contains the ANSI-escape `[2m` (dim/faint mode).
Summary
One of the Metals users hit an issue when Metals wasn't displaying errors which came from ZIO test suite. After an investigation I found that issue is caused by Fansi. ZIO sets various ansi styles in their tests and at least one of them (Faint -
"\u001b[2m"
) is unsupported by Fansi:In Metals, we use Fansi to obtain plain text from bsp diagnostic before forwarding it to the lsp client.
Reproduction
Behavior
Expected Behavior
Fansi should parse
\u001b[2m
ansi code, as well as other styles defined in linked file from ZIO repository.The text was updated successfully, but these errors were encountered: