BestPracticesSourceGeneratorsDemo
A demo example demonstraing a few useful practices when working with source generators
Install / Use
/learn @TessenR/BestPracticesSourceGeneratorsDemoREADME
BestPracticesSourceGeneratorsDemo
An example demonstraing a few useful practices when working with source generators
The example is focused on advices for working with source generators that can be checked one by one in commit history such as
- Switching from syntax to semantics as early as possible
- Usage of context.CancellationToken
- Using ISyntaxReceiver to reduce the generator's working time
- Providing attributes that should be used in target projects to configure a generator from the generator itself
- Configuring a generator via MSBuild properties
- Providing a generator with access to additional files it might need
- Emitting diagnostics when generator encounters a problem
- Lifting CS8785 warning indicating a generator failure in the target project to an error
- Warning about potential malicious generators
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
