Skip to content

Merge hotreload-utils source into runtime repo#126512

Merged
akoeplinger merged 7 commits intodotnet:mainfrom
steveisok:merge-hotreload-utils
Apr 10, 2026
Merged

Merge hotreload-utils source into runtime repo#126512
akoeplinger merged 7 commits intodotnet:mainfrom
steveisok:merge-hotreload-utils

Conversation

@steveisok
Copy link
Copy Markdown
Member

Copy the hotreload-utils source code from dotnet/hotreload-utils into src/tools/hotreload-delta-gen/ and replace the NuGet PackageReference with direct in-repo MSBuild targets, eliminating the cross-repo dependency.

Changes:

  • Add 5 projects + shared code from hotreload-utils under src/tools/hotreload-delta-gen/
  • Create eng/testing/hotreload-delta-gen.targets replacing the NuGet package's .targets file
  • Update 3 consumers (ApplyUpdate tests, WASM HotReload test, Mono sample) to import local targets instead of NuGet package
  • Add BuildTool and Tasks to src/libraries/pretest.proj for build ordering
  • Remove hotreload-utils dependency from eng/Version.Details.xml and eng/Version.Details.props
  • Suppress analyzers on imported code (RunAnalyzers=false) matching the illink pattern

Copy the hotreload-utils source code from dotnet/hotreload-utils into
src/tools/hotreload-delta-gen/ and replace the NuGet PackageReference
with direct in-repo MSBuild targets, eliminating the cross-repo
dependency.

Changes:
- Add 5 projects + shared code from hotreload-utils under
  src/tools/hotreload-delta-gen/
- Create eng/testing/hotreload-delta-gen.targets replacing the NuGet
  package's .targets file
- Update 3 consumers (ApplyUpdate tests, WASM HotReload test, Mono
  sample) to import local targets instead of NuGet package
- Add BuildTool and Tasks to src/libraries/pretest.proj for build
  ordering
- Remove hotreload-utils dependency from eng/Version.Details.xml and
  eng/Version.Details.props
- Suppress analyzers on imported code (RunAnalyzers=false) matching
  the illink pattern

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR vendors the hotreload-utils delta generation toolchain into the runtime repo under src/tools/hotreload-delta-gen/, replaces the external NuGet-based integration with in-repo MSBuild targets, and updates existing consumers to use the in-repo targets.

Changes:

  • Added in-repo hot reload delta generator source (tool + MSBuild task + shared data/types) under src/tools/hotreload-delta-gen/.
  • Introduced eng/testing/hotreload-delta-gen.targets to replace the NuGet package .targets and updated consumers to import it.
  • Removed the dotnet/hotreload-utils dependency from versioning files and ensured build ordering via src/libraries/pretest.proj.

Reviewed changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Util/FSWGen.cs Adds FileSystemWatcher-to-Channel async event streaming for live delta generation.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Util/AsyncEnumerableExtras.cs Adds helper to provide an empty IAsyncEnumerable<T>.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Script/ParsedScript.cs Adds parsed-script representation for scripted delta runs.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Script/Json/Parsing.cs Adds JSON parsing for scripted delta input.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Runners/ScriptRunner.cs Adds runner that reads a script file and generates deltas.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Runners/LiveRunner.cs Adds runner that watches the filesystem for live edits and generates deltas.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Runner.cs Adds common runner orchestration (baseline setup, capability handling, delta loop).
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Plan/Change.cs Adds plan/change primitives used across scripted/live modes.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Microsoft.DotNet.HotReload.Utils.Generator.csproj Defines the generator project and Roslyn/MSBuild dependencies.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/EnC/EditAndContinueCapabilities.cs Vendors EnC capability enum used for Roslyn Hot Reload integration.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/EditAndContinueCapabilitiesParser.cs Adds parsing of capability strings into enum values.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/DocResolver.cs Adds file-path → DocumentId mapping for Roslyn documents.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/DiffyException.cs Adds typed exception with process exit code propagation.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/DeltaProject.cs Core delta build logic using Roslyn HotReloadService.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/DeltaOutputStreams.cs Wraps delta output streams and disposal semantics.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/DeltaNaming.cs Defines naming convention for emitted delta artifacts per revision.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Delta.cs Defines delta input record for the generation pipeline.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/Config.cs Adds config model and builder for scripted/live invocation.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/BaselineProject.cs Adds baseline project loading and HotReloadService session setup.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator/BaselineArtifacts.cs Defines baseline artifacts bundle passed through generation pipeline.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.Tasks/Microsoft.DotNet.HotReload.Utils.Generator.Tasks.csproj Adds MSBuild task project used by the new targets file.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.Tasks/HotReloadDeltaGeneratorComputeScriptOutputs.cs Adds MSBuild task to compute incremental inputs/outputs from the delta script.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.Frontend/Microsoft.DotNet.HotReload.Utils.Generator.Frontend.csproj Adds CLI frontend project for the generator.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.Frontend/Frontend.cs Adds argument parsing and exit-code handling for CLI invocation.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.Data/UpdateHandlerInfo.cs Adds JSON-serializable update handler info payload.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.Data/Script/Json/ScriptCapabilitiesConverter.cs Adds JSON converter to support capabilities as string or string array.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.Data/Script/Json/Script.cs Adds JSON model types for delta scripts.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.Data/OutputSummary/OutputSummary.cs Adds JSON model types for delta output summaries.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.Data/Microsoft.DotNet.HotReload.Utils.Generator.Data.csproj Adds data-only project for shared contracts.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.BuildTool/README.md Documents the build tool usage (historical/package-oriented wording).
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.BuildTool/Program.cs Adds entrypoint forwarding to the CLI frontend.
src/tools/hotreload-delta-gen/Microsoft.DotNet.HotReload.Utils.Generator.BuildTool/Microsoft.DotNet.HotReload.Utils.Generator.BuildTool.csproj Adds executable build-tool project.
src/tools/hotreload-delta-gen/Directory.Build.targets Imports parent tool build targets for this tool subtree.
src/tools/hotreload-delta-gen/Directory.Build.props Sets TFM/lang/nullable and disables analyzers for imported code.
src/tools/hotreload-delta-gen/Common/TempDirectory.cs Adds temp directory helper.
src/tests/FunctionalTests/WebAssembly/Browser/HotReload/ApplyUpdateReferencedAssembly/ApplyUpdateReferencedAssembly.csproj Switches from NuGet package reference to importing in-repo targets.
src/mono/sample/mbr/console/ConsoleDelta.csproj Switches from NuGet package reference to importing in-repo targets.
src/libraries/System.Runtime.Loader/tests/ApplyUpdate/Directory.Build.targets Imports in-repo hotreload delta gen targets for ApplyUpdate tests.
src/libraries/System.Runtime.Loader/tests/ApplyUpdate/Directory.Build.props Removes NuGet package reference for delta generation in ApplyUpdate tests.
src/libraries/pretest.proj Adds tool/task projects to pretest build ordering.
eng/Version.Details.xml Removes hotreload-utils dependency entry.
eng/Version.Details.props Removes hotreload-utils version properties.
eng/testing/hotreload-delta-gen.targets New in-repo MSBuild targets replacing the NuGet-provided .targets.

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Copilot AI review requested due to automatic review settings April 8, 2026 19:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 43 changed files in this pull request and generated 5 comments.

Copilot AI review requested due to automatic review settings April 9, 2026 14:32
akoeplinger and others added 2 commits April 9, 2026 16:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 43 changed files in this pull request and generated 2 comments.

@akoeplinger
Copy link
Copy Markdown
Member

/ba-g unrelated infrastructure failures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants