mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-14 11:28:57 +00:00
There were a number of iterations on the design that weren't reflected in the initial port to the terminal rendering library. This PR tries to complete the rendering side of things to match the design we landed on: code-focused, with messages attached by lines to the code, and condensed as much as possible to avoid the vertical space. It also improves the styling to make things more visually distinguishable such as adding a `->` to the main error line, and making the underlines and connectors for it have a heavy weight (when the font supports that). Another major change is having multiple messages on a single line be drawn in source lexical order. This requires the connectors to cross without joining, but makes it easier to read the messages. This PR also has some refactorings to enable these improvements, and a _number_ of improvements to comment prose and terminology to try and avoid jargon and make things read more naturally. Sorry for the fact that Claude left a bunch of this mannerly language in comments despite my efforts, but I'm continuing to try and drive the prose towards something direct and simple to read. Some of the terminology improvements also needed to be made in the design doc and those have been made here. Note that I don't think this rendering is perfect or should be viewed as final. I'm happy to iterate on it further, and have a few adjustments in mind already, but would like to focus this on getting the _implementation_ of the current rendering design in place, and then we can make targeted changes or tweaks as needed. For example, I'm not yet fully happy with the rendering when messages are too long and we move them all the way to the left, but am leaving that for a follow-up. Assisted-by: Claude Code