Retry source requests
All checks were successful
Build / Compute Version (push) Successful in 6s
Build / Build Nuget package (SharedCringe) (push) Successful in 1m4s
Build / Build Nuget package (NuGet) (push) Successful in 1m6s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 1m10s
Build / Build Nuget package (CringePlugins) (push) Successful in 1m18s
Build / Build Launcher (push) Successful in 1m54s
All checks were successful
Build / Compute Version (push) Successful in 6s
Build / Build Nuget package (SharedCringe) (push) Successful in 1m4s
Build / Build Nuget package (NuGet) (push) Successful in 1m6s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 1m10s
Build / Build Nuget package (CringePlugins) (push) Successful in 1m18s
Build / Build Launcher (push) Successful in 1m54s
Handle missing sources Minor Optimizations Move thread pool improvement to debug while we fix it
This commit is contained in:
@@ -19,7 +19,8 @@
|
||||
<Publicize Include="Sandbox.Game:Sandbox.MySandboxGame.form" />
|
||||
<Publicize Include="Sandbox.Game:Sandbox.MySandboxGame.RenderThread_SizeChanged" />
|
||||
<Publicize Include="VRage.Render;VRage.Render11;VRage.Platform.Windows;VRage.Scripting;VRage.Input" IncludeCompilerGeneratedMembers="false" />
|
||||
</ItemGroup>
|
||||
<Publicize Include="VRage.Scripting:VRage.Scripting.Rewriters.ProtoTagRewriter" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Basic.Reference.Assemblies.Net90" Version="1.8.0" />
|
||||
|
@@ -195,8 +195,11 @@ public class Launcher : ICorePlugin
|
||||
|
||||
private static void InitThreadPool()
|
||||
{
|
||||
#if DEBUG
|
||||
ParallelTasks.Parallel.Scheduler = new ThreadPoolScheduler();
|
||||
// MySandboxGame.InitMultithreading();
|
||||
#else
|
||||
MySandboxGame.InitMultithreading();
|
||||
#endif
|
||||
}
|
||||
|
||||
private static void ConfigureSettings()
|
||||
|
@@ -1,21 +0,0 @@
|
||||
using HarmonyLib;
|
||||
using Sandbox.Game.World;
|
||||
|
||||
namespace CringeLauncher.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(MyScriptManager), nameof(MyScriptManager.Init))]
|
||||
public static class DarkTardMissingNamespacePatch
|
||||
{
|
||||
private static void Prefix(Dictionary<string, string> ___m_compatibilityChanges)
|
||||
{
|
||||
___m_compatibilityChanges["using System.Runtime.Remoting.Metadata.W3cXsd2001;"] = "";
|
||||
___m_compatibilityChanges["using System.IO.Ports;"] = "";
|
||||
___m_compatibilityChanges["using System.Runtime.Remoting;"] = "";
|
||||
___m_compatibilityChanges["using System.Runtime.Remoting.Messaging;"] = "";
|
||||
___m_compatibilityChanges["using System.Numerics;"] = "";
|
||||
___m_compatibilityChanges["using System.Runtime.Remoting.Lifetime;"] = "";
|
||||
___m_compatibilityChanges["using System.Net.Configuration;"] = "";
|
||||
___m_compatibilityChanges["using System.Reflection.Metadata.Ecma335;"] = "";
|
||||
___m_compatibilityChanges["using Microsoft.VisualBasic;"] = "";
|
||||
}
|
||||
}
|
@@ -1,18 +1,18 @@
|
||||
using HarmonyLib;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using VRage.Scripting;
|
||||
using CringeLauncher.SyntaxRewriters;
|
||||
using VRage.Scripting.Rewriters;
|
||||
|
||||
namespace CringeLauncher.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(MyScriptCompiler), "InjectMod")]
|
||||
[HarmonyPatch(typeof(ProtoTagRewriter), "Rewrite")]
|
||||
internal static class ModRewriterPatch
|
||||
{
|
||||
public static void Prefix(ref CSharpCompilation compilation, ref SyntaxTree syntaxTree)
|
||||
public static bool Prefix(CSharpCompilation compilation, SyntaxTree syntaxTree, ref SyntaxTree __result)
|
||||
{
|
||||
var fixedSyntaxTree = MissingUsingRewriter.Rewrite(compilation, syntaxTree);
|
||||
compilation = compilation.ReplaceSyntaxTree(syntaxTree, fixedSyntaxTree);
|
||||
syntaxTree = fixedSyntaxTree;
|
||||
__result = MissingUsingRewriter.Rewrite(compilation, syntaxTree);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -2,12 +2,13 @@
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using System.Diagnostics;
|
||||
using VRage.Scripting.Rewriters;
|
||||
|
||||
namespace CringeLauncher.SyntaxRewriters;
|
||||
internal sealed class MissingUsingRewriter : CSharpSyntaxRewriter
|
||||
internal sealed class MissingUsingRewriter : ProtoTagRewriter //use existing rewriter to prevent another iteration
|
||||
{
|
||||
private readonly SemanticModel _semanticModel;
|
||||
private MissingUsingRewriter(CSharpCompilation compilation, SyntaxTree tree) => _semanticModel = compilation.GetSemanticModel(tree);
|
||||
private MissingUsingRewriter(CSharpCompilation compilation, SyntaxTree tree) : base(compilation, tree) => _semanticModel = compilation.GetSemanticModel(tree);
|
||||
|
||||
public static SyntaxTree Rewrite(CSharpCompilation compilation, SyntaxTree tree)
|
||||
{
|
||||
|
Reference in New Issue
Block a user