diff --git a/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs b/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs index 915e59fa7..55346fae2 100644 --- a/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs +++ b/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs @@ -26,10 +26,6 @@ public static class CompilationFinishedHook // controls weather Weaver errors are reported direct to the Unity console (tests enable this) public static bool UnityLogEnabled = true; - // holds the result status of our latest Weave operation - // NOTE: WeaveFailed is critical to unit tests, but isn't used for anything else. - public static bool WeaveFailed { get; private set; } - // warning message handler that also calls OnWarningMethod delegate static void HandleWarning(string msg) { @@ -147,17 +143,10 @@ static void OnCompilationFinished(string assemblyPath, CompilerMessage[] message Log.WarningMethod = HandleWarning; Log.ErrorMethod = HandleError; - if (Weaver.WeaveAssembly(assemblyPath, dependencyPaths.ToArray())) - { - // NOTE: WeaveFailed is critical for unit tests but isn't used elsewhere - WeaveFailed = false; - } - else + if (!Weaver.WeaveAssembly(assemblyPath, dependencyPaths.ToArray())) { // Set false...will be checked in \Editor\EnterPlayModeSettingsCheck.CheckSuccessfulWeave() SessionState.SetBool("MIRROR_WEAVE_SUCCESS", false); - - WeaveFailed = true; if (UnityLogEnabled) Debug.LogError("Weaving failed for: " + assemblyPath); } } diff --git a/Assets/Mirror/Tests/Editor/Weaver/WeaverTests.cs b/Assets/Mirror/Tests/Editor/Weaver/WeaverTests.cs index a1e4cd04d..bf5d2d3ad 100644 --- a/Assets/Mirror/Tests/Editor/Weaver/WeaverTests.cs +++ b/Assets/Mirror/Tests/Editor/Weaver/WeaverTests.cs @@ -74,10 +74,6 @@ protected void BuildAndWeaveTestAssembly(string className, string testName) // ensure all errors have a location Assert.That(error, Does.Match(@"\(at .*\)$")); } - if (weaverErrors.Count > 0) - Assert.That(CompilationFinishedHook.WeaveFailed, Is.True, "Weaver should fail if there are errors"); - else - Assert.That(CompilationFinishedHook.WeaveFailed, Is.False, "Weaver should succeed if there are no errors"); } [OneTimeSetUp]