Compiling rendered output inside a spec — the thing that caught 1,438 compile errors nobody knew about — required Cratis and Cratis.Arc.MongoDB as references on Rendering.Cratis. Because this repo keeps specs in the project they test, those are normal references, so the published Cratis.Stage.Rendering.Cratis package now takes a dependency on Cratis.
PrivateAssets="All" was tried and is strictly worse: it wins version unification and hides Cratis.Fundamentals from consumers, breaking them at startup.
Three ways out, none obviously right:
- Leave it. A renderer that emits Cratis code arguably should depend on Cratis, and the alternative below deviates from the repo's layout. Cost: every consumer of the rendering package pulls Cratis and MongoDB whether or not it wants them.
- A separate
Rendering.Cratis.Specs project. Clean — the package stays dependency-free and the spec project takes what it needs. Cost: deviates from this repo's in-project spec convention, which every other project follows.
- Compile against reference assemblies instead of the real ones. Keeps the spec and the layout, but the compilation is then less faithful than the one that found the bugs.
Worth deciding before the package is more widely consumed, since it is a public dependency either way.
Related: the same spec needed ExcludeAssets="analyzers", because Cratis' type-discovery source generator otherwise bakes a runtime binding into what is fundamentally a text generator.
@einari — your call. Option 1 is the status quo and is defensible; option 2 is cleaner but breaks this repo's in-project spec convention.
Compiling rendered output inside a spec — the thing that caught 1,438 compile errors nobody knew about — required
CratisandCratis.Arc.MongoDBas references onRendering.Cratis. Because this repo keeps specs in the project they test, those are normal references, so the publishedCratis.Stage.Rendering.Cratispackage now takes a dependency on Cratis.PrivateAssets="All"was tried and is strictly worse: it wins version unification and hidesCratis.Fundamentalsfrom consumers, breaking them at startup.Three ways out, none obviously right:
Rendering.Cratis.Specsproject. Clean — the package stays dependency-free and the spec project takes what it needs. Cost: deviates from this repo's in-project spec convention, which every other project follows.Worth deciding before the package is more widely consumed, since it is a public dependency either way.
Related: the same spec needed
ExcludeAssets="analyzers", because Cratis' type-discovery source generator otherwise bakes a runtime binding into what is fundamentally a text generator.@einari — your call. Option 1 is the status quo and is defensible; option 2 is cleaner but breaks this repo's in-project spec convention.