From b779aa02fec7da4990e322a8471fdb14bcfa744a Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Sun, 15 Nov 2026 09:55:28 +0000 Subject: [PATCH] chore: publish this project's purview.dev catalogue record See ADR 0013 in purview-dev/purview-dev. --- .config/purview-docs.yml | 84 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 .config/purview-docs.yml diff --git a/.config/purview-docs.yml b/.config/purview-docs.yml new file mode 100644 index 0000000..35daf65 --- /dev/null +++ b/.config/purview-docs.yml @@ -0,0 +1,84 @@ +# The purview.dev catalogue record for this project (ADR 0013 in purview-dev/purview-dev). +# The site reads this file from the default branch of this repository, so the record +# changes in the same pull request as the thing it describes. +# +# `$schema` is an editor hint and nothing more: the enforcing validation is the site's +# loader, which `just check-projects` runs there. +$schema: https://raw.githubusercontent.com/purview-dev/purview-dev/main/src/src/lib/manifest/schema.ts + +id: sourcegenerator-framework +name: SourceGenerator Framework +shortDescription: A typed framework for building incremental C# source generators. +description: >- + A strongly typed framework for building, testing, and maintaining + incremental C# source generators with Roslyn. Includes structured code + generation, attribute data models, type libraries, and a step-cache test + runner for verifying incremental behaviour. +origin: >- + Building several incremental generators exposed the same needs for typed models, structured + output, testing, and cache verification, so those foundations became a shared framework. +useWhen: >- + You are building a non-trivial incremental C# source generator and want reusable modelling, + code-writing, packaging, and testing infrastructure. +avoidWhen: >- + Your generator is small enough for the Roslyn APIs directly, or adopting a framework would + hide behaviour your implementation needs to control precisely. +repository: purview-dev/sourcegenerator-framework +category: source-generation +status: stable +featured: true +order: 40 +docs: + source: github-path + path: docs/wiki + rootPage: Getting-Started.md + exclude: + - _Sidebar.md + - Home.md + - index.md +targetFrameworks: + - net10.0 + - net11.0 +packages: + - id: Purview.SourceGeneratorFramework + description: Core helpers, models, and MSBuild integration for incremental generators. + primary: true + targetFrameworks: + - netstandard2.0 + - id: Purview.SourceGeneratorFramework.Testing + description: Framework-agnostic test runner and assertions for generator tests. + - id: Purview.SourceGeneratorFramework.Testing.TUnit + description: TUnit-specific test base classes and assertions. +useCases: + - audience: contributor + title: Build an incremental generator on typed foundations + scenario: >- + You are writing a non-trivial incremental C# source generator and need typed attribute + models, structured code output, and packaging that Roslyn will actually load. + code: | + + language: xml + outcome: >- + The framework supplies attribute-data models, a structured code writer, a type library, and + packaging helpers so the generator stays focused on its own logic. + evidence: >- + The Purview generators themselves are built on the framework, so it is exercised by real + generators rather than being an untested abstraction. + docsPage: guide + - audience: contributor + title: Verify incremental behaviour in tests + scenario: >- + You need to prove a generator is incremental and produces the code you expect, without + assembling a Roslyn driver by hand in every test. + outcome: >- + The testing package provides SourceGeneratorTestRunner, a framework-agnostic test + base, and assertions such as AssertSingleGeneratedSource and AssertNoCompilationErrors. + evidence: >- + Step-cache tests and a TUnit integration ship alongside the runner, so incremental regressions + surface in CI. + docsPage: testing