Skip to content

dotnet: proto tool refactor (staging) - #1

Open
Wtiben wants to merge 78 commits into
feat/dotnet-toolchainfrom
feat/dotnet-toolchain-rebased
Open

dotnet: proto tool refactor (staging)#1
Wtiben wants to merge 78 commits into
feat/dotnet-toolchainfrom
feat/dotnet-toolchain-rebased

Conversation

@Wtiben

@Wtiben Wtiben commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Staging PR for iterating on moonrepo#169 without touching the upstream PR.
Base is the PR branch rebased onto current upstream master, so the diff shows only new work.

  • migrate to the moon_pdk 2.1 API (VirtualPath redesign, version spec renames, CacheStrategy)
    — verified: wasm build + 114 tests green
  • next: tools/dotnet proto tool plugin

milesj and others added 30 commits August 10, 2026 15:18
…ts (moonrepo#182)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
New `dotnet_toolchain` WASM plugin covering tiers 1 through 3 for SDK-style
C#, F# and VB projects.

- tier1: register_toolchain (csproj/fsproj/vbproj, sln/slnx, global.json,
  Directory.Build.*, Directory.Packages.props, nuget.config, packages.*.lock.json),
  define_toolchain_config, initialize_toolchain, define_docker_metadata with
  restore-layer scaffold globs, prune_docker.
- tier2: locate_dependencies_root (nearest solution, then lock file, then project
  file), install_dependencies (dotnet restore, with --locked-mode when a lock file
  is present), setup_environment (dotnet tool restore for local tool manifests),
  extend_task_command (DOTNET_ROOT and PATH), extend_project_graph (dependency and
  task inference, AssemblyName aliases), parse_lock, parse_manifest,
  hash_task_contents.
- tier3: setup_toolchain, installing the SDK via the official dotnet-install
  scripts when `version` is configured.

Dependencies and tasks come from a real MSBuild evaluation rather than from
parsing project XML, so Directory.Build.targets imports, MSBuild properties such
as $(SolutionDir), conditional references and Central Package Management resolve
the way the SDK resolves them. There is no parser to maintain. Every project in
the workspace is evaluated in one batched traversal invocation rather than one
process per project, and the evaluated package sets are cached on disk so task
hashing reuses them instead of re-evaluating.

Registers dotnet-toolchain in .moon/workspace.yml, and adds actions/setup-dotnet
to CI because the integration tests evaluate their fixtures with a real dotnet
msbuild.
Evaluation runs with the SDK's default property values, so a reference or
package behind a condition lands in the graph even in a workspace whose real
builds never enable it. `msbuildProperties` sets MSBuild global properties for
evaluation only, applied to both the batched traversal and the per-project
fallback.

The properties form part of the evaluation cache digest, because a conditional
PackageReference resolves differently under different values and a cached
package set must not be served across configurations. Inferred task commands
and `dotnet restore` do not receive them, so `moon run` builds stay exactly
what the project defines.
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.

4 participants