com.wallstop-studios.dxmessaging 2.2.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +106 -67
- package/CHANGELOG.md.meta +7 -7
- package/Editor/Analyzers/BaseCallIlInspector.cs +277 -0
- package/Editor/Analyzers/BaseCallIlInspector.cs.meta +11 -0
- package/Editor/Analyzers/BaseCallLogMessageParser.cs +295 -0
- package/Editor/Analyzers/BaseCallLogMessageParser.cs.meta +11 -0
- package/Editor/Analyzers/BaseCallReportAggregator.cs +308 -0
- package/Editor/Analyzers/BaseCallReportAggregator.cs.meta +11 -0
- package/Editor/Analyzers/BaseCallTypeScanner.cs +110 -0
- package/Editor/Analyzers/BaseCallTypeScanner.cs.meta +11 -0
- package/Editor/Analyzers/BaseCallTypeScannerCore.cs +562 -0
- package/Editor/Analyzers/BaseCallTypeScannerCore.cs.meta +11 -0
- package/Editor/Analyzers/DxMessagingConsoleHarvester.cs +1122 -0
- package/Editor/Analyzers/DxMessagingConsoleHarvester.cs.meta +11 -0
- package/Editor/Analyzers/Microsoft.CodeAnalysis.CSharp.dll.meta +44 -44
- package/Editor/Analyzers/Microsoft.CodeAnalysis.dll.meta +44 -44
- package/Editor/Analyzers/System.Collections.Immutable.dll.meta +44 -44
- package/Editor/Analyzers/System.Reflection.Metadata.dll.meta +44 -44
- package/Editor/Analyzers/System.Runtime.CompilerServices.Unsafe.dll.meta +44 -44
- package/Editor/Analyzers/WallstopStudios.DxMessaging.Analyzer.dll +0 -0
- package/Editor/Analyzers/WallstopStudios.DxMessaging.Analyzer.dll.meta +33 -0
- package/Editor/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.dll +0 -0
- package/Editor/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.dll.meta +72 -72
- package/Editor/Analyzers.meta +8 -8
- package/Editor/AssemblyInfo.cs.meta +3 -3
- package/Editor/CustomEditors/MessageAwareComponentFallbackEditor.cs +81 -0
- package/Editor/CustomEditors/MessageAwareComponentFallbackEditor.cs.meta +11 -0
- package/Editor/CustomEditors/MessageAwareComponentInspectorOverlay.cs +420 -0
- package/Editor/CustomEditors/MessageAwareComponentInspectorOverlay.cs.meta +11 -0
- package/Editor/CustomEditors/MessagingComponentEditor.cs +1 -1
- package/Editor/CustomEditors/MessagingComponentEditor.cs.meta +2 -2
- package/Editor/CustomEditors.meta +2 -2
- package/Editor/DxMessagingEditorInitializer.cs.meta +2 -2
- package/Editor/DxMessagingMenu.cs.meta +11 -11
- package/Editor/DxMessagingSceneBuildProcessor.cs.meta +11 -11
- package/Editor/Settings/DxMessagingBaseCallIgnoreSync.cs +190 -0
- package/Editor/Settings/DxMessagingBaseCallIgnoreSync.cs.meta +11 -0
- package/Editor/Settings/DxMessagingSettings.cs +189 -0
- package/Editor/Settings/DxMessagingSettings.cs.meta +2 -2
- package/Editor/Settings/DxMessagingSettingsProvider.cs +50 -33
- package/Editor/Settings/DxMessagingSettingsProvider.cs.meta +2 -2
- package/Editor/Settings.meta +2 -2
- package/Editor/SetupCscRsp.cs +209 -8
- package/Editor/SetupCscRsp.cs.meta +2 -2
- package/Editor/Testing/MessagingComponentEditorHarness.cs +1 -1
- package/Editor/Testing/MessagingComponentEditorHarness.cs.meta +3 -3
- package/Editor/Testing.meta +3 -3
- package/Editor/WallstopStudios.DxMessaging.Editor.asmdef +14 -14
- package/Editor/WallstopStudios.DxMessaging.Editor.asmdef.meta +7 -7
- package/Editor.meta +8 -8
- package/LICENSE.md +9 -9
- package/LICENSE.md.meta +7 -7
- package/README.md +941 -900
- package/README.md.meta +7 -7
- package/Runtime/AssemblyInfo.cs +4 -0
- package/Runtime/AssemblyInfo.cs.meta +2 -2
- package/Runtime/Core/Attributes/DxAutoConstructorAttribute.cs.meta +2 -2
- package/Runtime/Core/Attributes/DxBroadcastMessageAttribute.cs.meta +2 -2
- package/Runtime/Core/Attributes/DxIgnoreMissingBaseCallAttribute.cs +26 -0
- package/Runtime/Core/Attributes/DxIgnoreMissingBaseCallAttribute.cs.meta +11 -0
- package/Runtime/Core/Attributes/DxOptionalParameterAttribute.cs.meta +2 -2
- package/Runtime/Core/Attributes/DxTargetedMessageAttribute.cs.meta +2 -2
- package/Runtime/Core/Attributes/DxUntargetedMessageAttribute.cs.meta +2 -2
- package/Runtime/Core/Attributes.meta +2 -2
- package/Runtime/Core/Configuration/DxMessagingRuntimeSettings.cs +195 -0
- package/Runtime/Core/Configuration/DxMessagingRuntimeSettings.cs.meta +11 -0
- package/Runtime/Core/Configuration/DxMessagingRuntimeSettingsProvider.cs +179 -0
- package/Runtime/Core/Configuration/DxMessagingRuntimeSettingsProvider.cs.meta +11 -0
- package/Runtime/Core/Configuration.meta +9 -0
- package/Runtime/Core/DataStructure/CyclicBuffer.cs +2 -2
- package/Runtime/Core/DataStructure/CyclicBuffer.cs.meta +2 -2
- package/Runtime/Core/DataStructure.meta +2 -2
- package/Runtime/Core/Diagnostics/MessageEmissionData.cs.meta +2 -2
- package/Runtime/Core/Diagnostics/MessageRegistrationData.cs.meta +2 -2
- package/Runtime/Core/Diagnostics/MessageRegistrationType.cs.meta +2 -2
- package/Runtime/Core/Diagnostics.meta +2 -2
- package/Runtime/Core/DxMessagingStaticState.cs +19 -0
- package/Runtime/Core/DxMessagingStaticState.cs.meta +11 -11
- package/Runtime/Core/Extensions/EnumExtensions.cs.meta +2 -2
- package/Runtime/Core/Extensions/IListExtensions.cs.meta +2 -2
- package/Runtime/Core/Extensions/MessageBusExtensions.cs.meta +12 -12
- package/Runtime/Core/Extensions/MessageExtensions.cs.meta +11 -11
- package/Runtime/Core/Extensions.meta +8 -8
- package/Runtime/Core/Helper/MessageCache.cs +32 -0
- package/Runtime/Core/Helper/MessageCache.cs.meta +2 -2
- package/Runtime/Core/Helper/MessageHelperIndexer.cs.meta +2 -2
- package/Runtime/Core/Helper.meta +2 -2
- package/Runtime/Core/IMessage.cs +3 -3
- package/Runtime/Core/IMessage.cs.meta +11 -11
- package/Runtime/Core/InstanceId.cs.meta +11 -11
- package/Runtime/Core/Internal/TypedDispatchLinkIndex.cs +51 -0
- package/Runtime/Core/Internal/TypedDispatchLinkIndex.cs.meta +11 -0
- package/Runtime/Core/Internal/TypedGlobalSlotIndex.cs +38 -0
- package/Runtime/Core/Internal/TypedGlobalSlotIndex.cs.meta +11 -0
- package/Runtime/Core/Internal/TypedSlotIndex.cs +81 -0
- package/Runtime/Core/Internal/TypedSlotIndex.cs.meta +11 -0
- package/Runtime/Core/Internal/TypedSlots.cs +613 -0
- package/Runtime/Core/Internal/TypedSlots.cs.meta +11 -0
- package/Runtime/Core/Internal.meta +9 -0
- package/Runtime/Core/MessageBus/DiagnosticsTarget.cs.meta +11 -11
- package/Runtime/Core/MessageBus/GlobalMessageBusProvider.cs.meta +11 -11
- package/Runtime/Core/MessageBus/IMessageBus.cs +177 -3
- package/Runtime/Core/MessageBus/IMessageBus.cs.meta +11 -11
- package/Runtime/Core/MessageBus/IMessageBusProvider.cs.meta +11 -11
- package/Runtime/Core/MessageBus/IMessageRegistrationBuilder.cs.meta +11 -11
- package/Runtime/Core/MessageBus/Internal/BusContextIndex.cs +16 -0
- package/Runtime/Core/MessageBus/Internal/BusContextIndex.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/BusSinkIndex.cs +40 -0
- package/Runtime/Core/MessageBus/Internal/BusSinkIndex.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/BusSlots.cs +718 -0
- package/Runtime/Core/MessageBus/Internal/BusSlots.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/DispatchKind.cs +38 -0
- package/Runtime/Core/MessageBus/Internal/DispatchKind.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/DispatchPhase.cs +20 -0
- package/Runtime/Core/MessageBus/Internal/DispatchPhase.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/DispatchVariant.cs +28 -0
- package/Runtime/Core/MessageBus/Internal/DispatchVariant.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/IEvictableSlot.cs +48 -0
- package/Runtime/Core/MessageBus/Internal/IEvictableSlot.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/ISweepable.cs +15 -0
- package/Runtime/Core/MessageBus/Internal/ISweepable.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/RegistrationMethodAxes.cs +222 -0
- package/Runtime/Core/MessageBus/Internal/RegistrationMethodAxes.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal/SlotKey.cs +192 -0
- package/Runtime/Core/MessageBus/Internal/SlotKey.cs.meta +11 -0
- package/Runtime/Core/MessageBus/Internal.meta +9 -0
- package/Runtime/Core/MessageBus/MessageBus.cs +2651 -500
- package/Runtime/Core/MessageBus/MessageBus.cs.meta +11 -11
- package/Runtime/Core/MessageBus/MessageBusRebindMode.cs.meta +11 -11
- package/Runtime/Core/MessageBus/MessageRegistrationBuilder.cs.meta +11 -11
- package/Runtime/Core/MessageBus/MessagingRegistration.cs.meta +11 -11
- package/Runtime/Core/MessageBus/RegistrationLog.cs.meta +11 -11
- package/Runtime/Core/MessageBus.meta +8 -8
- package/Runtime/Core/MessageHandler.cs +2019 -542
- package/Runtime/Core/MessageHandler.cs.meta +11 -11
- package/Runtime/Core/MessageRegistrationHandle.cs.meta +11 -11
- package/Runtime/Core/MessageRegistrationToken.cs +7 -0
- package/Runtime/Core/MessageRegistrationToken.cs.meta +11 -11
- package/Runtime/Core/Messages/GlobalStringMessage.cs.meta +2 -2
- package/Runtime/Core/Messages/IBroadcastMessage.cs.meta +11 -11
- package/Runtime/Core/Messages/ITargetedMessage.cs.meta +11 -11
- package/Runtime/Core/Messages/IUntargetedMessage.cs.meta +11 -11
- package/Runtime/Core/Messages/ReflexiveMessage.cs.meta +2 -2
- package/Runtime/Core/Messages/SourcedStringMessage.cs.meta +11 -11
- package/Runtime/Core/Messages/StringMessage.cs.meta +2 -2
- package/Runtime/Core/Messages.meta +8 -8
- package/Runtime/Core/MessagingDebug.cs.meta +11 -11
- package/Runtime/Core/Pooling/CollectionPool.cs +266 -0
- package/Runtime/Core/Pooling/CollectionPool.cs.meta +11 -0
- package/Runtime/Core/Pooling/CollectionPoolDiagnostics.cs +30 -0
- package/Runtime/Core/Pooling/CollectionPoolDiagnostics.cs.meta +11 -0
- package/Runtime/Core/Pooling/DxPools.cs +157 -0
- package/Runtime/Core/Pooling/DxPools.cs.meta +11 -0
- package/Runtime/Core/Pooling/EvictionPlayerLoopHook.cs +106 -0
- package/Runtime/Core/Pooling/EvictionPlayerLoopHook.cs.meta +11 -0
- package/Runtime/Core/Pooling/IDxMessagingClock.cs +18 -0
- package/Runtime/Core/Pooling/IDxMessagingClock.cs.meta +11 -0
- package/Runtime/Core/Pooling/PoolDiagnosticsSnapshot.cs +55 -0
- package/Runtime/Core/Pooling/PoolDiagnosticsSnapshot.cs.meta +11 -0
- package/Runtime/Core/Pooling/StopwatchClock.cs +27 -0
- package/Runtime/Core/Pooling/StopwatchClock.cs.meta +11 -0
- package/Runtime/Core/Pooling/UnityRealtimeClock.cs +31 -0
- package/Runtime/Core/Pooling/UnityRealtimeClock.cs.meta +11 -0
- package/Runtime/Core/Pooling.meta +9 -0
- package/Runtime/Core.meta +8 -8
- package/Runtime/Unity/CurrentGlobalMessageBusProvider.cs.meta +12 -12
- package/Runtime/Unity/DxMessagingRuntimeInitializer.cs.meta +11 -11
- package/Runtime/Unity/InitialGlobalMessageBusProvider.cs.meta +12 -12
- package/Runtime/Unity/Integrations/Reflex/AssemblyInfo.cs.meta +2 -2
- package/Runtime/Unity/Integrations/Reflex/ReflexRegistrationInstaller.cs +73 -0
- package/Runtime/Unity/Integrations/Reflex/ReflexRegistrationInstaller.cs.meta +11 -11
- package/Runtime/Unity/Integrations/Reflex/WallstopStudios.DxMessaging.Reflex.asmdef +20 -20
- package/Runtime/Unity/Integrations/Reflex/WallstopStudios.DxMessaging.Reflex.asmdef.meta +7 -7
- package/Runtime/Unity/Integrations/Reflex.meta +8 -8
- package/Runtime/Unity/Integrations/VContainer/AssemblyInfo.cs.meta +2 -2
- package/Runtime/Unity/Integrations/VContainer/VContainerRegistrationExtensions.cs +109 -1
- package/Runtime/Unity/Integrations/VContainer/VContainerRegistrationExtensions.cs.meta +11 -11
- package/Runtime/Unity/Integrations/VContainer/WallstopStudios.DxMessaging.VContainer.asmdef +30 -30
- package/Runtime/Unity/Integrations/VContainer/WallstopStudios.DxMessaging.VContainer.asmdef.meta +7 -7
- package/Runtime/Unity/Integrations/VContainer.meta +8 -8
- package/Runtime/Unity/Integrations/Zenject/AssemblyInfo.cs.meta +2 -2
- package/Runtime/Unity/Integrations/Zenject/WallstopStudios.DxMessaging.Zenject.asmdef +30 -30
- package/Runtime/Unity/Integrations/Zenject/WallstopStudios.DxMessaging.Zenject.asmdef.meta +7 -7
- package/Runtime/Unity/Integrations/Zenject/ZenjectRegistrationInstaller.cs +79 -1
- package/Runtime/Unity/Integrations/Zenject/ZenjectRegistrationInstaller.cs.meta +11 -11
- package/Runtime/Unity/Integrations/Zenject.meta +8 -8
- package/Runtime/Unity/Integrations.meta +8 -8
- package/Runtime/Unity/MessageAwareComponent.cs +29 -0
- package/Runtime/Unity/MessageAwareComponent.cs.meta +11 -11
- package/Runtime/Unity/MessageBusProviderHandle.cs.meta +12 -12
- package/Runtime/Unity/MessagingComponent.cs.meta +11 -11
- package/Runtime/Unity/MessagingComponentInstaller.cs.meta +12 -12
- package/Runtime/Unity/ScriptableMessageBusProvider.cs.meta +12 -12
- package/Runtime/Unity.meta +8 -8
- package/Runtime/WallstopStudios.DxMessaging.asmdef +14 -14
- package/Runtime/WallstopStudios.DxMessaging.asmdef.meta +7 -7
- package/Runtime.meta +8 -8
- package/Samples~/DI/Prefabs/MessagingInstallerSample.prefab +98 -98
- package/Samples~/DI/Prefabs/MessagingInstallerSample.prefab.meta +7 -7
- package/Samples~/DI/Prefabs.meta +8 -8
- package/Samples~/DI/Providers/GlobalMessageBusProvider.asset +14 -14
- package/Samples~/DI/Providers/GlobalMessageBusProvider.asset.meta +8 -8
- package/Samples~/DI/Providers/InitialGlobalMessageBusProvider.asset +14 -14
- package/Samples~/DI/Providers/InitialGlobalMessageBusProvider.asset.meta +8 -8
- package/Samples~/DI/Providers.meta +8 -8
- package/Samples~/DI/README.md +51 -51
- package/Samples~/DI/README.md.meta +7 -7
- package/Samples~/DI/Reflex/SampleInstaller.cs +7 -0
- package/Samples~/DI/Reflex/SampleInstaller.cs.meta +11 -11
- package/Samples~/DI/Reflex.meta +8 -8
- package/Samples~/DI/VContainer/SampleLifetimeScope.cs +6 -1
- package/Samples~/DI/VContainer/SampleLifetimeScope.cs.meta +11 -11
- package/Samples~/DI/VContainer.meta +8 -8
- package/Samples~/DI/Zenject/SampleInstaller.cs +8 -0
- package/Samples~/DI/Zenject/SampleInstaller.cs.meta +11 -11
- package/Samples~/DI/Zenject.meta +8 -8
- package/Samples~/DI.meta +8 -8
- package/Samples~/Mini Combat/Boot.cs.meta +11 -11
- package/Samples~/Mini Combat/Enemy.cs.meta +11 -11
- package/Samples~/Mini Combat/Messages.cs.meta +11 -11
- package/Samples~/Mini Combat/Player.cs.meta +11 -11
- package/Samples~/Mini Combat/README.md +324 -323
- package/Samples~/Mini Combat/README.md.meta +7 -7
- package/Samples~/Mini Combat/UIOverlay.cs.meta +11 -11
- package/Samples~/Mini Combat/Walkthrough.md +430 -430
- package/Samples~/Mini Combat/Walkthrough.md.meta +7 -7
- package/Samples~/Mini Combat/WallstopStudios.DxMessaging.MiniCombat.Sample.asmdef +13 -13
- package/Samples~/Mini Combat/WallstopStudios.DxMessaging.MiniCombat.Sample.asmdef.meta +7 -7
- package/Samples~/Mini Combat.meta +8 -8
- package/Samples~/UI Buttons + Inspector/DiagnosticsEnabler.cs.meta +11 -11
- package/Samples~/UI Buttons + Inspector/Messages.cs.meta +11 -11
- package/Samples~/UI Buttons + Inspector/MessagingObserver.cs.meta +11 -11
- package/Samples~/UI Buttons + Inspector/README.md +210 -209
- package/Samples~/UI Buttons + Inspector/README.md.meta +7 -7
- package/Samples~/UI Buttons + Inspector/UIButtonEmitter.cs.meta +11 -11
- package/Samples~/UI Buttons + Inspector/WallstopStudios.DxMessaging.UIButtons.Sample.asmdef +13 -13
- package/Samples~/UI Buttons + Inspector/WallstopStudios.DxMessaging.UIButtons.Sample.asmdef.meta +7 -7
- package/Samples~/UI Buttons + Inspector.meta +8 -8
- package/SourceGenerators/Directory.Build.props.meta +7 -7
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxAutoConstructorGenerator.cs.meta +11 -11
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxMessageIdGenerator.cs.meta +2 -2
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.csproj.meta +7 -7
- package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.meta +8 -8
- package/SourceGenerators.meta +8 -8
- package/Third Party Notices.md +3 -3
- package/Third Party Notices.md.meta +7 -7
- package/package.json +115 -92
- package/package.json.meta +7 -7
package/Editor/SetupCscRsp.cs
CHANGED
|
@@ -7,6 +7,7 @@ namespace DxMessaging.Editor
|
|
|
7
7
|
using System.IO;
|
|
8
8
|
using System.Linq;
|
|
9
9
|
using System.Security.Cryptography;
|
|
10
|
+
using DxMessaging.Editor.Settings;
|
|
10
11
|
using UnityEditor;
|
|
11
12
|
using UnityEngine;
|
|
12
13
|
using Object = UnityEngine.Object;
|
|
@@ -30,9 +31,20 @@ namespace DxMessaging.Editor
|
|
|
30
31
|
private static readonly string SourceGeneratorDllName =
|
|
31
32
|
"WallstopStudios.DxMessaging.SourceGenerators.dll";
|
|
32
33
|
|
|
34
|
+
// The analyzer DLL is a SEPARATE assembly compiled against Roslyn 3.8.0 because Unity 2021's
|
|
35
|
+
// analyzer loader silently rejects analyzer DLLs built against Roslyn 4.x. The source-
|
|
36
|
+
// generator DLL above stays at Roslyn 4.x because it uses IIncrementalGenerator (4.0+).
|
|
37
|
+
// Both DLLs ship side-by-side and both need the RoslynAnalyzer label.
|
|
38
|
+
private static readonly string AnalyzerDllName = "WallstopStudios.DxMessaging.Analyzer.dll";
|
|
39
|
+
|
|
40
|
+
// The analyzer DLLs and shared Roslyn surface ship unconditionally; they're light enough
|
|
41
|
+
// and required for DXMSG002–DXMSG009 to function at all. The list intentionally references
|
|
42
|
+
// a few transitive Roslyn deps that may or may not physically ship with the package; the
|
|
43
|
+
// copy loop below silently skips any name that isn't on disk.
|
|
33
44
|
private static readonly string[] RequiredDllNames =
|
|
34
45
|
{
|
|
35
46
|
SourceGeneratorDllName,
|
|
47
|
+
AnalyzerDllName,
|
|
36
48
|
"Microsoft.CodeAnalysis.dll",
|
|
37
49
|
"Microsoft.CodeAnalysis.CSharp.dll",
|
|
38
50
|
"System.Text.Encodings.Web.dll",
|
|
@@ -44,7 +56,17 @@ namespace DxMessaging.Editor
|
|
|
44
56
|
"System.Threading.Tasks.Extensions.dll",
|
|
45
57
|
"System.Numerics.Vectors.dll",
|
|
46
58
|
"System.Text.Encoding.CodePages.dll",
|
|
47
|
-
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// DLLs that must be tagged with Unity's "RoslynAnalyzer" asset label so Unity's compiler
|
|
62
|
+
// pipeline picks them up as analyzer/source-generator hosts. Other DLLs in the same folder
|
|
63
|
+
// (Roslyn runtime, immutable collections) are plain Editor-only plugin DLLs.
|
|
64
|
+
private static readonly HashSet<string> AnalyzerLabeledDllNames = new(
|
|
65
|
+
StringComparer.OrdinalIgnoreCase
|
|
66
|
+
)
|
|
67
|
+
{
|
|
68
|
+
SourceGeneratorDllName,
|
|
69
|
+
AnalyzerDllName,
|
|
48
70
|
};
|
|
49
71
|
|
|
50
72
|
private static readonly HashSet<string> DllNames = new(StringComparer.OrdinalIgnoreCase);
|
|
@@ -53,6 +75,7 @@ namespace DxMessaging.Editor
|
|
|
53
75
|
{
|
|
54
76
|
EditorApplication.delayCall += EnsureDLLsExistInAssets;
|
|
55
77
|
EditorApplication.delayCall += EnsureCscRsp;
|
|
78
|
+
EditorApplication.delayCall += EnsureAdditionalFileForIgnoreList;
|
|
56
79
|
}
|
|
57
80
|
|
|
58
81
|
private static void EnsureDLLsExistInAssets()
|
|
@@ -107,7 +130,7 @@ namespace DxMessaging.Editor
|
|
|
107
130
|
AssetDatabase.ImportAsset(outputAsset);
|
|
108
131
|
}
|
|
109
132
|
|
|
110
|
-
if (requiredDllName
|
|
133
|
+
if (AnalyzerLabeledDllNames.Contains(requiredDllName))
|
|
111
134
|
{
|
|
112
135
|
Object loadedDll = AssetDatabase.LoadMainAssetAtPath(outputAsset);
|
|
113
136
|
if (loadedDll != null)
|
|
@@ -190,6 +213,10 @@ namespace DxMessaging.Editor
|
|
|
190
213
|
return !sourceHash.AsSpan().SequenceEqual(destinationHash);
|
|
191
214
|
}
|
|
192
215
|
|
|
216
|
+
/// <summary>
|
|
217
|
+
/// Synchronizes <c>csc.rsp</c> with the current set of analyzer arguments derived from the
|
|
218
|
+
/// on-disk DLL roster.
|
|
219
|
+
/// </summary>
|
|
193
220
|
private static void EnsureCscRsp()
|
|
194
221
|
{
|
|
195
222
|
try
|
|
@@ -201,20 +228,81 @@ namespace DxMessaging.Editor
|
|
|
201
228
|
}
|
|
202
229
|
|
|
203
230
|
string rspContent = File.ReadAllText(RspFilePath);
|
|
204
|
-
|
|
205
|
-
|
|
231
|
+
|
|
232
|
+
// Get current valid analyzer arguments
|
|
233
|
+
HashSet<string> currentAnalyzerArgs = new(
|
|
234
|
+
GetAnalyzerArguments(),
|
|
235
|
+
StringComparer.OrdinalIgnoreCase
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
// Parse existing lines and filter out stale DxMessaging analyzer entries
|
|
239
|
+
List<string> newLines = new();
|
|
240
|
+
bool foundStaleEntries = false;
|
|
241
|
+
|
|
242
|
+
foreach (
|
|
243
|
+
string line in rspContent.Split(
|
|
244
|
+
new[] { '\r', '\n' },
|
|
245
|
+
StringSplitOptions.RemoveEmptyEntries
|
|
246
|
+
)
|
|
247
|
+
)
|
|
206
248
|
{
|
|
207
|
-
|
|
249
|
+
string trimmedLine = line.Trim();
|
|
250
|
+
|
|
251
|
+
// Check if this is a DxMessaging analyzer line
|
|
252
|
+
bool isDxMessagingAnalyzer =
|
|
253
|
+
trimmedLine.StartsWith("-a:", StringComparison.OrdinalIgnoreCase)
|
|
254
|
+
&& (
|
|
255
|
+
trimmedLine.Contains(
|
|
256
|
+
"com.wallstop-studios.dxmessaging",
|
|
257
|
+
StringComparison.OrdinalIgnoreCase
|
|
258
|
+
)
|
|
259
|
+
|| trimmedLine.Contains(
|
|
260
|
+
"WallstopStudios.DxMessaging",
|
|
261
|
+
StringComparison.OrdinalIgnoreCase
|
|
262
|
+
)
|
|
263
|
+
);
|
|
264
|
+
|
|
265
|
+
if (isDxMessagingAnalyzer)
|
|
208
266
|
{
|
|
209
|
-
|
|
267
|
+
// Only keep if it's in the current valid set
|
|
268
|
+
if (currentAnalyzerArgs.Contains(trimmedLine))
|
|
269
|
+
{
|
|
270
|
+
newLines.Add(trimmedLine);
|
|
271
|
+
}
|
|
272
|
+
else
|
|
273
|
+
{
|
|
274
|
+
foundStaleEntries = true;
|
|
275
|
+
}
|
|
210
276
|
}
|
|
277
|
+
else
|
|
278
|
+
{
|
|
279
|
+
// Keep all non-DxMessaging lines as-is
|
|
280
|
+
newLines.Add(trimmedLine);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
211
283
|
|
|
212
|
-
|
|
213
|
-
|
|
284
|
+
// Add any new analyzer arguments that aren't already present
|
|
285
|
+
bool foundNewEntries = false;
|
|
286
|
+
foreach (string analyzerArgument in currentAnalyzerArgs)
|
|
287
|
+
{
|
|
288
|
+
if (!newLines.Contains(analyzerArgument, StringComparer.OrdinalIgnoreCase))
|
|
289
|
+
{
|
|
290
|
+
newLines.Add(analyzerArgument);
|
|
291
|
+
foundNewEntries = true;
|
|
292
|
+
}
|
|
214
293
|
}
|
|
215
294
|
|
|
295
|
+
bool modified = foundStaleEntries || foundNewEntries;
|
|
296
|
+
|
|
216
297
|
if (modified)
|
|
217
298
|
{
|
|
299
|
+
// Write the cleaned up content
|
|
300
|
+
string newContent = string.Join(Environment.NewLine, newLines);
|
|
301
|
+
if (!string.IsNullOrEmpty(newContent))
|
|
302
|
+
{
|
|
303
|
+
newContent += Environment.NewLine;
|
|
304
|
+
}
|
|
305
|
+
File.WriteAllText(RspFilePath, newContent);
|
|
218
306
|
AssetDatabase.ImportAsset("csc.rsp");
|
|
219
307
|
Debug.Log("Updated csc.rsp.");
|
|
220
308
|
}
|
|
@@ -225,6 +313,119 @@ namespace DxMessaging.Editor
|
|
|
225
313
|
}
|
|
226
314
|
}
|
|
227
315
|
|
|
316
|
+
/// <summary>
|
|
317
|
+
/// Ensures <c>csc.rsp</c> contains a single <c>-additionalfile:</c> line pointing at the
|
|
318
|
+
/// base-call ignore sidecar, when (and only when) that sidecar physically exists. Stale
|
|
319
|
+
/// entries pointing at moved or deleted sidecar paths are removed.
|
|
320
|
+
/// </summary>
|
|
321
|
+
/// <remarks>
|
|
322
|
+
/// The sidecar is generated by <see cref="DxMessagingBaseCallIgnoreSync"/> only when there
|
|
323
|
+
/// is content to write. csc happily runs without it, so this method does NOT auto-create.
|
|
324
|
+
/// </remarks>
|
|
325
|
+
private static void EnsureAdditionalFileForIgnoreList()
|
|
326
|
+
{
|
|
327
|
+
try
|
|
328
|
+
{
|
|
329
|
+
if (!File.Exists(RspFilePath))
|
|
330
|
+
{
|
|
331
|
+
File.WriteAllText(RspFilePath, string.Empty);
|
|
332
|
+
AssetDatabase.ImportAsset("csc.rsp");
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
string sidecarRelativePath = DxMessagingBaseCallIgnoreSync.SidecarAssetPath;
|
|
336
|
+
string projectRoot = Path.GetFullPath(Path.Combine(Application.dataPath, ".."))
|
|
337
|
+
.Replace("\\", "/");
|
|
338
|
+
string sidecarAbsolutePath = Path.Combine(projectRoot, sidecarRelativePath)
|
|
339
|
+
.Replace("\\", "/");
|
|
340
|
+
|
|
341
|
+
bool sidecarExists = File.Exists(sidecarAbsolutePath);
|
|
342
|
+
string desiredLine = $"-additionalfile:\"{sidecarRelativePath}\"";
|
|
343
|
+
|
|
344
|
+
string rspContent = File.ReadAllText(RspFilePath);
|
|
345
|
+
List<string> newLines = new();
|
|
346
|
+
bool foundDesired = false;
|
|
347
|
+
bool foundStale = false;
|
|
348
|
+
|
|
349
|
+
foreach (
|
|
350
|
+
string line in rspContent.Split(
|
|
351
|
+
new[] { '\r', '\n' },
|
|
352
|
+
StringSplitOptions.RemoveEmptyEntries
|
|
353
|
+
)
|
|
354
|
+
)
|
|
355
|
+
{
|
|
356
|
+
string trimmedLine = line.Trim();
|
|
357
|
+
|
|
358
|
+
bool isDxMessagingAdditionalFile =
|
|
359
|
+
trimmedLine.StartsWith(
|
|
360
|
+
"-additionalfile:",
|
|
361
|
+
StringComparison.OrdinalIgnoreCase
|
|
362
|
+
)
|
|
363
|
+
&& trimmedLine.Contains("DxMessaging.", StringComparison.OrdinalIgnoreCase)
|
|
364
|
+
&& trimmedLine.Contains(
|
|
365
|
+
"BaseCallIgnore",
|
|
366
|
+
StringComparison.OrdinalIgnoreCase
|
|
367
|
+
);
|
|
368
|
+
|
|
369
|
+
if (isDxMessagingAdditionalFile)
|
|
370
|
+
{
|
|
371
|
+
if (
|
|
372
|
+
sidecarExists
|
|
373
|
+
&& string.Equals(
|
|
374
|
+
trimmedLine,
|
|
375
|
+
desiredLine,
|
|
376
|
+
StringComparison.OrdinalIgnoreCase
|
|
377
|
+
)
|
|
378
|
+
)
|
|
379
|
+
{
|
|
380
|
+
if (!foundDesired)
|
|
381
|
+
{
|
|
382
|
+
newLines.Add(trimmedLine);
|
|
383
|
+
foundDesired = true;
|
|
384
|
+
}
|
|
385
|
+
else
|
|
386
|
+
{
|
|
387
|
+
// Drop duplicate.
|
|
388
|
+
foundStale = true;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
else
|
|
392
|
+
{
|
|
393
|
+
// Stale entry pointing at a moved/renamed/deleted sidecar; drop it.
|
|
394
|
+
foundStale = true;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
else
|
|
398
|
+
{
|
|
399
|
+
newLines.Add(trimmedLine);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
bool needsAppend = sidecarExists && !foundDesired;
|
|
404
|
+
if (needsAppend)
|
|
405
|
+
{
|
|
406
|
+
newLines.Add(desiredLine);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
bool modified = foundStale || needsAppend;
|
|
410
|
+
|
|
411
|
+
if (modified)
|
|
412
|
+
{
|
|
413
|
+
string newContent = string.Join(Environment.NewLine, newLines);
|
|
414
|
+
if (!string.IsNullOrEmpty(newContent))
|
|
415
|
+
{
|
|
416
|
+
newContent += Environment.NewLine;
|
|
417
|
+
}
|
|
418
|
+
File.WriteAllText(RspFilePath, newContent);
|
|
419
|
+
AssetDatabase.ImportAsset("csc.rsp");
|
|
420
|
+
Debug.Log("Updated csc.rsp additionalfile entries.");
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
catch (IOException ex)
|
|
424
|
+
{
|
|
425
|
+
Debug.LogError($"Failed to update csc.rsp additionalfile entry: {ex}");
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
228
429
|
private static IEnumerable<string> GetAnalyzerArguments()
|
|
229
430
|
{
|
|
230
431
|
HashSet<string> yielded = new(StringComparer.OrdinalIgnoreCase);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 54bd01ff5fd34bbc9950a1c7230a15d8
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 54bd01ff5fd34bbc9950a1c7230a15d8
|
|
3
3
|
timeCreated: 1730841461
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 2624c9e8eb5243ebb71545774f411c2c
|
|
3
|
-
timeCreated: 1761880591
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 2624c9e8eb5243ebb71545774f411c2c
|
|
3
|
+
timeCreated: 1761880591
|
package/Editor/Testing.meta
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: a61780c8ba084b29bb44fdefc9b7fcf2
|
|
3
|
-
timeCreated: 1761880591
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: a61780c8ba084b29bb44fdefc9b7fcf2
|
|
3
|
+
timeCreated: 1761880591
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "WallstopStudios.DxMessaging.Editor",
|
|
3
|
-
"rootNamespace": "DxMessaging.Editor",
|
|
4
|
-
"references": ["WallstopStudios.DxMessaging"],
|
|
5
|
-
"includePlatforms": ["Editor"],
|
|
6
|
-
"excludePlatforms": [],
|
|
7
|
-
"allowUnsafeCode": false,
|
|
8
|
-
"overrideReferences": false,
|
|
9
|
-
"precompiledReferences": [],
|
|
10
|
-
"autoReferenced": true,
|
|
11
|
-
"defineConstraints": [],
|
|
12
|
-
"versionDefines": [],
|
|
13
|
-
"noEngineReferences": false
|
|
14
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "WallstopStudios.DxMessaging.Editor",
|
|
3
|
+
"rootNamespace": "DxMessaging.Editor",
|
|
4
|
+
"references": ["WallstopStudios.DxMessaging"],
|
|
5
|
+
"includePlatforms": ["Editor"],
|
|
6
|
+
"excludePlatforms": [],
|
|
7
|
+
"allowUnsafeCode": false,
|
|
8
|
+
"overrideReferences": false,
|
|
9
|
+
"precompiledReferences": [],
|
|
10
|
+
"autoReferenced": true,
|
|
11
|
+
"defineConstraints": [],
|
|
12
|
+
"versionDefines": [],
|
|
13
|
+
"noEngineReferences": false
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 4be90ea11db262f43913b0e065a25c7f
|
|
3
|
-
AssemblyDefinitionImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 4be90ea11db262f43913b0e065a25c7f
|
|
3
|
+
AssemblyDefinitionImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|
package/Editor.meta
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 41dce8be641afe34ca8363865b8cd5d9
|
|
3
|
-
folderAsset: yes
|
|
4
|
-
DefaultImporter:
|
|
5
|
-
externalObjects: {}
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 41dce8be641afe34ca8363865b8cd5d9
|
|
3
|
+
folderAsset: yes
|
|
4
|
+
DefaultImporter:
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|
package/LICENSE.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# License
|
|
2
|
-
|
|
3
|
-
Copyright 2023 Eli Pinkerton
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
Copyright 2023 Eli Pinkerton
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/LICENSE.md.meta
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 2f7b715fd1838ea49b6fe45bcdd2e7eb
|
|
3
|
-
TextScriptImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 2f7b715fd1838ea49b6fe45bcdd2e7eb
|
|
3
|
+
TextScriptImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|