Skip to content

Add plugin auto-build and hot reload for dev#4

Open
Diddyy wants to merge 1 commit intonitrodevco:mainfrom
Diddyy:feature/plugin-dev-autoreload
Open

Add plugin auto-build and hot reload for dev#4
Diddyy wants to merge 1 commit intonitrodevco:mainfrom
Diddyy:feature/plugin-dev-autoreload

Conversation

@Diddyy
Copy link

@Diddyy Diddyy commented Feb 6, 2026

Adds DevPluginPaths config so the emulator loads plugins directly from their build output directory — no more copying DLLs into plugins/ during development.

Dev workflow:

  1. Point DevPluginPaths at your plugin's bin/Debug/net9.0
  2. Run dotnet watch build in your plugin project
  3. Edit, save, auto-rebuild, auto-reload — clients stay connected

Changes:

  • DevPluginPaths in PluginConfig — emulator discovers plugins from build output
  • Hot-reload watcher monitors both plugins/ and dev paths
  • ALC unload failures now log warnings instead of failing silently
  • Added README documenting the full plugin dev setup

Copilot AI review requested due to automatic review settings February 6, 2026 13:45
Copy link

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 adds development-only plugin hot reload and auto-build capabilities to improve the plugin development workflow when debugging Turbo.Main. The changes introduce file system watchers that monitor plugin artifacts and source code, automatically rebuilding and reloading plugins when changes are detected. These features are only enabled in the Development environment via configuration.

Changes:

  • Added ReloadAsync(string key) method to PluginManager for targeted single-plugin reloads
  • Implemented PluginHotReloadService to watch plugin artifact folders and trigger reloads on file changes
  • Implemented PluginAutoBuildService to watch plugin source folders and trigger dotnet builds on code changes
  • Wired up console commands reload-plugins and reload-plugin <key> for manual plugin management

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
Turbo.Plugins/PluginManager.cs Added ReloadAsync method for single-plugin reloads and extracted RebuildDependents helper
Turbo.Plugins/PluginHotReloadService.cs New hosted service that watches plugin artifacts and debounces reload requests
Turbo.Plugins/PluginAutoBuildService.cs New hosted service that watches plugin source files and triggers auto-builds
Turbo.Plugins/Extensions/ServiceCollectionExtensions.cs Conditionally registers hot reload and auto-build services in Development environment
Turbo.Plugins/Configuration/PluginConfig.cs Added configuration properties for hot reload and auto-build features
Turbo.Main/Console/ConsoleCommandService.cs Implemented reload-plugins and reload-plugin commands with proper usage messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Diddyy Diddyy marked this pull request as draft February 6, 2026 15:36
@Diddyy Diddyy force-pushed the feature/plugin-dev-autoreload branch from 4506f48 to faa9095 Compare February 6, 2026 17:44
@Diddyy Diddyy marked this pull request as ready for review February 6, 2026 17:45
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