Skip to content

Moving Plugin code to https://github.com/natemcmaster/DotNetCorePlugins#162

Closed
mdickson wants to merge 30 commits into
developfrom
feature/dotnetcore-plugins
Closed

Moving Plugin code to https://github.com/natemcmaster/DotNetCorePlugins#162
mdickson wants to merge 30 commits into
developfrom
feature/dotnetcore-plugins

Conversation

@mdickson

Copy link
Copy Markdown
Collaborator

Moving Plugin code to https://github.com/natemcmaster/DotNetCorePlugins/tree/main
This is a simpler approach vs Mono.Addins that also handles dependencies in a more sane way/ Its using AssemblyLoadContext under the hood to manage plugin loading. The framework is also compatible with DI and since thats out future direction this is an enabling change.

Mike Dickson added 19 commits February 12, 2026 22:16
…ependent on the scriptengine so dlls get published together.
…ent robust startup, and config/docs updates

- add IPluginDiscovery backends/capabilities and strict env override precedence

- migrate and instrument startup/region/wind/robust plugin discovery call sites

- make robust plugin command wiring optional/best-effort and add startup toggle

- update sample/default server configs plus BUILDING and migration plan docs
- replace transitional reflection scanner with McMaster.NETCore.Plugins-backed discovery

- route reflection/dotnet backend selectors through DotNetCorePlugins implementation

- add McMaster.NETCore.Plugins dependency in OpenSim.Framework

- update migration plan status for real backend implementation
- Replace Ionic.Zlib.Core NuGet dependency with .NET built-in System.IO.Compression
- Update archiver compression: GZipStream now from System.IO.Compression
- Update materials compression: ZlibStream replaced with DeflateStream
- Remove legacy zlib assembly binding resolver from plugin discovery
- Clean up Ionic.Zlib references from skipped assembly list
- This eliminates the zlib.net 1.0.4.0 binding version mismatch errors

Removes external compression dependency and simplifies plugin loading
by eliminating the need for zlib.net legacy assembly binding resolution.
Add Step 1.1 completion notes describing the elimination of the
Ionic.Zlib.Core dependency and legacy zlib.net assembly binding
resolution from the plugin discovery system.
Implement core infrastructure for plugin discovery without XML manifests:

Phase 2.1: Config-Based Plugin Registry
- Create PluginRegistry.cs with support for:
  * Programmatic plugin registration
  * INI configuration loading
  * JSON configuration loading
  * Plugin descriptors with metadata (id, name, version, enabled, priority)
  * Query and merge operations

Phase 2.2: DotNetCorePluginLoader<T>
- Create DotNetCorePluginLoader<T> with:
  * Discovery backend abstraction
  * Registry-based loading (LoadFromRegistry)
  * Discovery-based loading (Load)
  * Proper initialization phase separation
  * Comprehensive error handling and logging
- Create factory methods for easy instantiation

Phase 2.3: Phase 2 Integration Helpers
- Create PluginLoaderHelper.cs with:
  * LoadPluginsUsingRegistry: Registry-only approach
  * LoadPluginsUsingDiscovery: Discovery-only approach
  * LoadPluginsHybrid: Registry-first with discovery fallback
  * DebugPluginLoader: Verbose logging for migration diagnostics

Both backends can coexist - use OPENSIM_PLUGIN_DISCOVERY env var or config
to switch between monoaddins (default) and reflection (new).
Add detailed notes about Phase 2.1/2.2/2.3 implementation:
- PluginRegistry for config-based plugin management
- DotNetCorePluginLoader for discovery-based or registry-based loading
- PluginLoaderHelper for smooth integration during migration
- Design enables coexistence with existing Mono.Addins during transition
@mdickson mdickson marked this pull request as draft April 23, 2026 04:50
Mike Dickson added 5 commits April 23, 2026 15:52
…migration

This commit completes the Mono.Addins plugin system migration by removing
the final two orphaned manifest files that contained only extension-point
definitions (no plugin extension entries):

- Removed Source/OpenSim.Data/Resources/OpenSim.Data.addin.xml
  * Defined extension points for data services
  * No longer needed as XML was never processed at runtime

- Removed Source/OpenSim.Server.RegionServer/Resources/OpenSim.Server.RegionServer.addin.xml
  * Defined primary extension points for all plugin types
  * Runtime uses code-based discovery and registration

Test updates:
- Removed allowlist entries for deleted manifests from migration guard tests
- Migration test suite still passes: 40/40

Validation gates all pass:
- Normal Debug build: 0 errors
- Reflection backend build: 0 errors
- Plugin migration tests: 40/40 passing

The plugin migration from Mono.Addins to DotNetCorePlugins is now fully
complete. The codebase contains no XML manifest dependencies and uses
pure code-based plugin registration and discovery.
@Misterblue

Copy link
Copy Markdown

Source/OpenSim.Framework/OpenSim.Framework.csproj has a PackageReference for "McMaster.NETCore.Plugins" but I don't see any imports for that package. Is the PackageReference still needed?

Mike Dickson and others added 4 commits May 9, 2026 18:09
* Temporary fixup for BulletSim and ubODE loading (#165)

The native libaries were not loading correctly for these modules.

Adding the config files is a temporary fix so that the import resolver
in the OpenMetaverse hack can run.

* SkiaSharp Updates, Step 1 (#167)

* Temporary fixup for BulletSim and ubODE loading

The native libaries were not loading correctly for these modules.

Adding the config files is a temporary fix so that the import resolver
in the OpenMetaverse hack can run.

* Update for Skia in MapImageService.cs

This module is for adding and removing map tiles at the request of
regions, and for getting map tiles at the request of viewers. It also
creates zoom tiles for the world map that the viewer requests.

It was not creating zoom tiles at all, and had issues with thread
isolation and synchronization.

I corrected the thread issues, and replaced some unnecessary bit-banging
of raw pixel data with proper compositing.

* Adding AppVeyor / Updating GridInfo (#158)

* Adding AppVeyor back into Develop

* Updating GridInfo with all known values until 2026

* Add new plan for a spike to totally excise system drawing from even dependent libs like Libopenmetaverse

* Renamed OpenMetaverseTypes to OpenMetaverse.Types for consistency.  This will also allow us to catch any old dependencies from the library replacement with our own version.

* libOMV is coming from github nuget now.  Remove the old direct references for PackageReference's instead.

---------

Co-authored-by: IainMcCracken <iain.mccracken@gmail.com>
Co-authored-by: Fly Man <fly.man.opensim@gmail.com>
Co-authored-by: Mike Dickson <mdickson.dickson@utopiaskye.com>
…ed with https or delegate to an ingress controller.

- Removed Mono.Security from above change
- Removed unreferenced usings throughout the codebase.  Trying to lean down files to just needed dependencies.
- Switched to newer namespace syntax supported by current compiler.
- We're getting LIBOMV from github nuget now.  Still need to address CI compiles via secrets.
@mdickson mdickson marked this pull request as ready for review May 23, 2026 20:20
@mdickson mdickson closed this May 24, 2026
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.

2 participants