Repository navigation
ci: check the README's C# blocks against the package - #2
Merged
Merged
Conversation
A reader who copies a C# block out of the README gets code that compiles against Reckon.Client, and a block that stops compiling fails CI before it ships. The job calls the shared check pinned by full commit SHA, and the publish job needs it, so the packages about to reach NuGet are the ones the blocks were compiled against. The submodule is fetched for it: Reckon.Client generates its gRPC stubs from the .proto files under proto/, so a plain checkout does not compile and every block would fail for a reason the doc does not have. The README's examples now carry the usings they need: `using Reckon;` on the first block, `using Reckon.Extensions.Hosting;` on the hosting block, and the projection worker block the missing `using Reckon.Extensions.Hosting;` and `using Reckon.Subscriptions;` (reckon-dotnet#1). Copying any of them into a file of its own compiles. Refs macula-codebase-checks#8, reckon-dotnet#1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose (usability): a reader who copies a C# block out of the README gets code that compiles against the package, and a block that stops compiling fails CI before it ships (macula-io/macula-codebase-checks#8).
ci.yml: adocsjob callingmacula-io/macula-ci-images/.github/workflows/doc-snippets-csharp.ymlpinned by full commit SHA (d25a36c), withsubmodules: recursivebecauseReckon.Clientgenerates its gRPC stubs from the.protofiles underproto/: without them the package does not compile and every block would fail for a reason the doc does not have.publishhasneeds: [build-test, release-guard, docs], so the packages that reach NuGet are the ones the blocks were compiled against.README fixes, so a block copied on its own compiles:
using Reckon;on the first example.using Reckon.Extensions.Hosting;on the hosting example.using Reckon.Extensions.Hosting;andusing Reckon.Subscriptions;on the projection worker block, whose two types were not in scope (The README's projection example does not compile: two types with no using #1).Locally the shared check reports 0 failures in 3 blocks. This repository's CI runs on main, tags and pull requests, so this draft PR is what runs the new job on a branch.
Refs macula-io/macula-codebase-checks#8, #1
🤖 Generated with Claude Code