Releases: Ambiguous-Interactive/DxMessaging
3.0.1
Changelog
Added
- New Roslyn base-call analyzer (
MessageAwareComponentBaseCallAnalyzer) that flagsMessageAwareComponentsubclasses whose lifecycle overrides forget to invokebase.Awake(),base.OnEnable(),base.OnDisable(),base.OnDestroy(), orbase.RegisterMessageHandlers(). Introduces diagnosticsDXMSG006(missing base call),DXMSG007(lifecycle method hidden withnew),DXMSG008(opt-out marker),DXMSG009(method implicitly hides a lifecycle method withoutoverride/new), andDXMSG010(base.{method}()chains into an override that does not reachMessageAwareComponent). DXMSG006's diagnostic message is now per-method: each guarded method emits a sentence describing the runtime consequence (registration token never created, handlers not re-enabled, memory leak, etc.) so users immediately see what breaks. The inspector overlay HelpBox renders the same per-method sentences. Severity is tunable per project via.editorconfig(e.g.dotnet_diagnostic.DXMSG006.severity = error). Ships as a separateWallstopStudios.DxMessaging.Analyzer.dlldeployed alongside the existing source-generator DLL bySetupCscRspso it loads under both Unity 2021's Roslyn 3.8 analyzer host and newer Unity versions. Diagnostic help links now open the current analyzer reference page in the DxMessaging repository. - Runtime self-check breadcrumb on
MessageAwareComponent:OnEnablenow logs a one-timeDebug.LogErrorper instance when the registration token is null, with a link to the DXMSG006 reference. Gated onUNITY_EDITOR || DEBUG, so release builds pay no cost. Catches the case where the analyzer DLL was disabled or did not run, surfacing the silent failure as a loud editor error instead. - New public
[DxIgnoreMissingBaseCall]attribute (DxMessaging.Core.Attributes) for source-level opt-out of the base-call analyzer. Applied to a class, every guarded lifecycle method on that class is exempt; applied to a single method, only that method is exempt. The analyzer still emits an Info-levelDXMSG008at the suppression site so opt-outs remain auditable, and the inspector overlay's snapshot honours the same scoping (method-level suppresses only the annotated method, type-level opts out the entire type). Not inherited -- derived classes must opt out explicitly. - New inspector overlay (
MessageAwareComponentInspectorOverlay) for everyMessageAwareComponentsubclass: missing-base-call warnings reported by the analyzer or harvested from the Unity console are surfaced as a HelpBox in the inspector header without clobbering user-defined[CustomEditor]s (the overlay hooksEditor.finishedDefaultHeaderGUI). The overlay restores the previous session's report immediately on Unity Editor startup (loaded fromLibrary/DxMessaging/baseCallReport.json) instead of waiting for the first post-reload scan to complete; the HelpBox is annotated(cached from previous session -- refreshing...)until the first scan refreshes it. A companion fallback editor (MessageAwareComponentFallbackEditor) hosts the overlay for subclasses with no other custom editor and renders the body viaDrawDefaultInspector()so subclasses with no serialized fields no longer leave an empty vertical gap below the inspector header. - New DxMessaging project-wide settings asset (
DxMessagingSettings, stored atAssets/Editor/DxMessagingSettings.asset) accessible from Unity's Project Settings. Controls diagnostics targets applied toIMessageBus.GlobalDiagnosticsTargets, the editor message buffer size, the domain-reload warning suppression, the base-call analyzer toggle, the project-wide base-call ignore list, and the optional Unity console bridge that feeds the inspector overlay. - New
docs/reference/analyzers.mdreference page documenting everyDXMSG###diagnostic the package emits, with severity, source generator/analyzer, trigger conditions, message text, and code samples for each. Added to the Reference section of the documentation site navigation. - Added
llms.txtplus README onboarding guidance so users can connect AI assistants with accurate DxMessaging package context. - Test-suite hardening: parameterized scenario fixture (
MessageScenario,MessageScenarios,ScenarioHarness,AllocationAssertions) underTests/Runtime/TestUtilities/enabling kind-parameterized tests. - Behavioural gap closures:
HandlerExceptionTests,ReentrantEmissionTests,NullAndInvalidInputTests,SingleThreadContractTestspinning exception-in-handler, re-entrancy, null-input, and threading contracts. AllocationMatrixTestscovering zero-GC dispatch across kinds, interceptors, post-processors, diagnostics, and priority-based dispatch.- Expanded coverage now pins source-generator and analyzer behaviour that users rely on: generic / record struct / nested partial / nullable annotation cases for
DxMessageIdGenerator;[DxOptionalParameter]permutations and DXMSG005 boundary cases forDxAutoConstructorGenerator; positive opt-out cases forDxIgnoreMissingBaseCallAttribute. No runtime API change. - Three new public read-only registration counters on
IMessageBus:RegisteredInterceptors,RegisteredPostProcessors, andRegisteredGlobalAcceptAll. Lets diagnostic and leak-check tooling distinguish interceptor / post-processor / global accept-all leaks from regular handler leaks, and lets external monitors aggregate the bus's registration footprint without reflecting on internals.MessageBusaggregates the counters on each read by walking the per-message-type caches; consumers polling these properties in tight loops should snapshot at region boundaries. - Runtime memory-reclamation foundations:
DxMessagingRuntimeSettingsloads fromResources/DxMessagingRuntimeSettingsand hot-reloads eviction cadence, enablement, trim opt-out, and pool-cap changes without recreating the bus. Pooled internal collections and typed/bus slot registries preserve existing dispatch APIs while making empty handler and interceptor slots reclaimable.IMessageBus.Trim(force)andMessageHandler.TrimAll(force)reset dirty empty slots and trim shared pools on demand,OccupiedTypeSlots/OccupiedTargetSlotsexpose the retained bus and dirty typed-handler slot footprint for diagnostics, and idle sweeps run from emits and Unity's PlayerLoop. New user-facing reference and tuning docs ship atdocs/reference/runtime-settings.md(per-setting reference table) anddocs/guides/memory-reclamation.md(forced trim, idle sweep, and pool tuning narrative). - New explicit-factory registration helpers across all three DI integrations:
VContainerRegistrationExtensions.RegisterDxMessagingBus,ReflexRegistrationExtensions.AddDxMessagingBus, andZenjectRegistrationExtensions.BindDxMessagingBus. Each helper exposes the bus under both the concreteMessageBuscontract and theIMessageBusinterface, accepts an overloadable lifetime where the container supports it, accepts a user-suppliedFunc<TResolver, MessageBus>factory, and accepts anIDxMessagingClockoverload that constructs the bus through the new internal-onlyMessageBus.CreateForInternalUsefactory so test-side clocks (for exampleFakeClock) can be injected through the container. The VContainer helper registers both contracts in one registration call, avoiding VContainer environments where chained.AsSelf().As<IMessageBus>()drops the concrete contract and fails withNo such registration of type: DxMessaging.Core.MessageBus.MessageBus; the DI samples either call the helper directly or document the corresponding helper preference for their container shape.
Changed
- Mutation tests now exercise every messaging kind (Untargeted/Targeted/Broadcast) via a single parameterized fixture (
[ValueSource(MessageScenarios.AllKinds)]) acrossMutationDuringEmissionTests,MutationInterceptorTests, andMutationDestructionTests. Users get tighter cross-kind parity guarantees; no runtime API change. (~720 lines of duplication removed; test count preserved.) - Renamed
UntargetedTests,TargetedTests,BroadcastTeststoEmitUntargetedSpecificTests,EmitTargetedSpecificTests,EmitBroadcastSpecificTeststo clarify that kind-common tests live inEmitTestsand kind-specific tests live in the renamed files. (Test-suite hardening is test-only; noRuntime/behavior was modified.) - Documentation now warns up front that
MessageAwareComponentsubclasses must callbase.Awake(),base.OnEnable(),base.OnDisable(),base.OnDestroy(), andbase.RegisterMessageHandlers()from any override; admonitions added to the Quick Start, Getting Started Guide, Visual Guide, README, FAQ, and Troubleshooting pages all link toDXMSG006(issue #195).
Fixed
- Cross-priority deregistration during in-flight emit no longer drops handlers from the current dispatch.
- Previously, when a handler at one priority removed a handler at a later priority of the same emission, the later priority's typed-handler stack was rebuilt from the now-mutated registry on first touch and the scheduled-for-removal handler was silently skipped, breaking the documented "frozen handler list per emission" contract.
- This affected sourced-broadcast, broadcast-without-source, and targeted-without-targeting dispatch (the targeted/untargeted paths already pre-froze every bucket up-front).
- The bus now pre-freezes every priority bucket's typed-handler caches up-front for every dispatch surface (sourced-broadcast, broadcast-without-source, targeted-without-targeting) and uses the per-emission snapshot count for the dispatch-loop early-out.
- The sourced-broadcast and broadcast-without-source dispatch loops also no longer short-circuit on the live
cache.handlers.Count == 0when the per-emission snapshot still holds the deregistered handler. - Post-processor prefreeze no longer takes a single-bucket/single-entry...
2.2.0
Changelog
Fixed
- Fixed a bug where no messages would get received by any listeners due to specifics in Unity play mode timings
Pull Requests
- No changes
Contributors
2.1.9
Changelog
No changelog entry found for version 2.1.9
Pull Requests
- Fix Static Reset (#164) Eli Pinkerton (@wallstop)
Contributors
2.1.8
Changelog
Fixed
- Added npmignore for proper npm publishing (incorrectly packaging some items)
Pull Requests
- Add npmignore (#159) Eli Pinkerton (@wallstop)
Contributors
2.1.7
Changelog
Changed
- Improved README with prominent Mental Model section
- Added Mermaid diagrams and decision flowchart for choosing message types
- Added Common Mistakes callout with troubleshooting link
- Updated performance comparison table with accurate benchmark range (10-17M ops/sec)
Fixed
- Regenerated corrupted meta files in
scripts/wiki
Pull Requests
- Minor documentation fixes (#156) Eli Pinkerton (@wallstop)
Contributors
2.1.6
Changelog
Added
- Concepts index page and Mental Model documentation for understanding DxMessaging's design principles
Fixed
- Orphaned documentation pages in Concepts section now included in mkdocs.yml navigation
- Burst compiler assembly resolution errors when using DxMessaging as a package on disk and building for player platforms. Benchmarks and integration test assembly definitions now specify Editor-only platform to prevent Burst from attempting to resolve these assemblies during player builds.
Pull Requests
- Update version to 2.1.6 (#154) Eli Pinkerton (@wallstop)
- Fix line endings (#153) Eli Pinkerton (@wallstop)
- Update docs with better mental model, maybe fix CI (#152) Eli Pinkerton (@wallstop)
- Third Try Dependabot (#150) Eli Pinkerton (@wallstop)
- Potential CI fixes again (#149) Eli Pinkerton (@wallstop)
- Potentially fix dependabot (again) (#148) Eli Pinkerton (@wallstop)
Contributors
Dependabot (@dependabot)[bot], Eli Pinkerton (@wallstop) and dependabot[bot]
2.1.5
Changelog
Added
- GitHub Pages documentation deployment with MkDocs Material theme
- Wiki synchronization workflow that automatically syncs documentation to GitHub Wiki
- Documentation validation workflow that runs on pull requests and pushes
- MkDocs build validation in pre-push hooks
- Searchable documentation site at https://wallstop.github.io/DxMessaging/
- Theme-aware Mermaid diagrams with automatic light/dark mode switching for GitHub Pages
- User-visible error messages when Mermaid diagrams fail to render
Changed
- Updated
documentationUrlin package.json to point to GitHub Pages site - Enhanced README.md with links to documentation site, wiki, and changelog
- Mermaid diagrams now use neutral theme fallback for GitHub/VSCode markdown preview compatibility
Fixed
- Comprehensive syntax highlighting for C# code blocks in documentation with distinct colors for keywords, types, functions, strings, numbers, comments, namespaces, and attributes
- WCAG AA accessibility compliance for code syntax highlighting in both light and dark themes
Pull Requests
- Bump version to 2.1.5 (#146) Eli Pinkerton (@wallstop)
- Correct SVG Path (#145) Eli Pinkerton (@wallstop)
- SVG banner (#144) Eli Pinkerton (@wallstop)
- CI Cleanup (#142) Eli Pinkerton (@wallstop)
- Add templates, fix CI/CD (#141) Eli Pinkerton (@wallstop)
- Update dependabot to ignore source generator project (#137) Eli Pinkerton (@wallstop)
- Initial GitHub Pages (#136) Eli Pinkerton (@wallstop)
- Docs Overhaul (#134) Eli Pinkerton (@wallstop)
- Initial LLM Refactor + Devcontainer (#127) Eli Pinkerton (@wallstop)
- Update EOL settings (#125) Eli Pinkerton (@wallstop)
- Performance Improvements - Take 1 (#123) Eli Pinkerton (@wallstop)
Contributors
Dependabot (@dependabot)[bot], Eli Pinkerton (@wallstop) and dependabot[bot]
2.1.4
2.1.3
✓ Reset static state in Unity on editor/domain reloads
✓ Augment DxMessaging settings with more configuration options
✓ Add context menus to MessagingComponent - can now dump context/state
✓ More comprehensive XML documentation
✓ Minor documentation updates
✓ Fix the shipped source generator solution now that the test project has been removed.
2.1.2
✓ Fully guard ALL Unity code in the project with Unity include guards
✓ Fix minor bugs related to DxMessaging lines not being stripped from stack traces
✓ More test coverage
✓ More benchmarks
✓ Source generator tests
✓ Minor source generator fixes
✓ Add file hash checking for analyzer dll copying
✓ Minor bug fixes for analyzer tagging
✓ Fix NPM badge (Fixes #78)
✓ Add installation link from README (Fixes #79)