Skip to content

Add source generation for colors, emojis and spinners#1995

Merged
patriksvensson merged 1 commit intospectreconsole:mainfrom
phil-scott-78:resource-to-generator
Jan 6, 2026
Merged

Add source generation for colors, emojis and spinners#1995
patriksvensson merged 1 commit intospectreconsole:mainfrom
phil-scott-78:resource-to-generator

Conversation

@phil-scott-78
Copy link
Copy Markdown
Contributor

This was suspiciously easy. Included in the project are the old generated emojis/colors/spinners and a unit test verifying anything the original is in the source generated. This should be dropped eventually, but figured nice to have while reviewing the code.

Beyond ensuring all the values are the same, I did try my best to make this as performant as I know how. Reading a mb of emojis in json is obviously something we don't want to be doing all the time, but I have it flowing through pipelines that are performant so it should hopefully avoid that. On my machine, with Rider and VS Code I saw it generate the code about 20 times over about 5 minutes as I was editing and even when it ran it was only a 50ms hit.

This also drops the Generator projects, the Asciicast stuff is no longer needed either with the new docs.

Copy link
Copy Markdown
Contributor

@patriksvensson patriksvensson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 👍

@patriksvensson patriksvensson merged commit 4de45cc into spectreconsole:main Jan 6, 2026
3 checks passed
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.

2 participants