Skip to content

feat: add Build:CSharpierPath to run a vendored CSharpier assembly - #32

Merged
kieronlanning merged 1 commit into
mainfrom
feat/csharpier-path-override
Oct 17, 2026
Merged

kieronlanning merged 1 commit into
mainfrom
feat/csharpier-path-override

Conversation

@kieronlanning

@kieronlanning kieronlanning commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Build:CSharpierPath so a consuming repository can run a CSharpier CLI assembly it vendors itself instead of the dotnet-tools.json manifest tool.

This is needed by repositories whose code contains C# 15 union declarations: the released CSharpier (1.3.0) reports those files as "not formatted due to syntax errors", which fails the Lint module in CI and the pre-commit hook. An unreleased CSharpier build parses them.

When Build:CSharpierPath is set, LintModule runs dotnet <path> check <repository root> directly and skips dotnet tool restore / dotnet tool run csharpier entirely. Unset, behaviour is unchanged.

Changes

  • BuildSettings.CSharpierPath (nullable string, unset by default)
  • LintModule override branch (RunCSharpierAsync)
  • appsettings.json default (null)
  • regenerated purview-build.schema.json (just schema)
  • docs/wiki/Pipeline-Modules.md, docs/wiki/Configuration-Reference.md, README.md
  • skills/purview-build-pipeline and skills/purview-build-configuration
  • package.json -> 0.6.0

Verification

  • dotnet build src/Build.slnx -c Release --warnaserror - clean
  • Build.UnitTests (335) and Repository.UnitTests (9) - pass
  • just config-matrix (21) and just release-matrix (20) - pass
  • just lint-check - pass
  • End-to-end: a scratch repository with CSharpierPath set ran the vendored assembly through LintModule (LintModule Passed, pipeline exit 0).

Consumers

purview-dev/changeops pins build-version: 0.6.0 and sets Build:CSharpierPath to its vendored CSharpier. It cannot pass CI until 0.6.0 is published.

A repository that needs an unreleased CSharpier (for example one that
formats C# 15 unions) can point Build:CSharpierPath at a CLI assembly it
vendors itself. LintModule then runs 'dotnet <path> check <root>' and
bypasses the dotnet-tools.json manifest tool entirely, so no tool
restore is required.
@kieronlanning
kieronlanning merged commit 750ca86 into main Oct 17, 2026
1 check passed
@kieronlanning
kieronlanning deleted the feat/csharpier-path-override branch October 17, 2026 22:11
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.

1 participant