Skip to content

Conversation

@lihaoyi
Copy link
Contributor

@lihaoyi lihaoyi commented Oct 29, 2025

This PR replaces Highlighting.scala and a bunch of ad-hoc color-management logic with Fansi, which does the same thing but in a tidier way

Mostly a call-for-call replacement, except we no longer juggle Console.RESETs like we previously did, and a lot of finicky imperative logic is gone since Fansi already implements it

There's definitely more that can be refactored to use fansi.Str instead of java.lang.String to model colored text, but this is a decent start

@som-snytt
Copy link
Contributor

OnlyFansi

@lihaoyi
Copy link
Contributor Author

lihaoyi commented Oct 30, 2025

The failure looks unrelated as far as I can tell, maybe a flake

@hamzaremmal
Copy link
Member

@lihaoyi We will be splitting the REPL and the compiler in #24243. As the compiler is the center of everything and it should be as much self-contained as possible. It has been decided by Scala Core that we should not keep the shaded libraries in the compiler itself and will become normal dependencies in the REPL. As a result, this PR would not be accepted.

@lihaoyi
Copy link
Contributor Author

lihaoyi commented Oct 30, 2025

Sounds good, feel free to close this then

@hamzaremmal
Copy link
Member

Thanks for understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants