chore: Restore HR support
This commit is contained in:
Родитель
a0ee1b5c8a
Коммит
63ee70d15c
|
@ -686,10 +686,17 @@ namespace Uno.Wasm.Bootstrap
|
|||
|
||||
Log.LogMessage(MessageImportance.Low, $"Bitcode files features lookup filter: {string.Join(",", features)}");
|
||||
|
||||
var list = BitcodeFilesSelector.Filter(new(EmscriptenVersion), features.ToArray(), bitcodeFiles);
|
||||
if (Version.TryParse(EmscriptenVersion, out var emsdkVersion))
|
||||
{
|
||||
var list = BitcodeFilesSelector.Filter(emsdkVersion, features.ToArray(), bitcodeFiles);
|
||||
|
||||
NativeFileReference = list.Select(i => new TaskItem(i)).ToArray();
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.LogMessage(MessageImportance.Low, $"EmscriptenVersion is not set, skipping native assets");
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerable<string> GetEmccExportedRuntimeMethods()
|
||||
=> (EmccExportedRuntimeMethod ?? Array.Empty<ITaskItem>()).Select(m => m.ItemSpec);
|
||||
|
|
|
@ -32,11 +32,24 @@
|
|||
BeforeTargets="ResolveRuntimePackAssets"
|
||||
Condition=" '$(WasmShellGenerateAOTProfile)' == 'true' ">
|
||||
<ItemGroup>
|
||||
<Reference Include="$(MSBuildThisFileDirectory)../tools/support/Uno.Wasm.AotProfiler.dll" CopyToOutputDirectory="Always" PostProcessAssembly="true" />
|
||||
<Reference Include="$(MSBuildThisFileDirectory)../tools/support/Uno.Wasm.AotProfiler.dll"
|
||||
CopyToOutputDirectory="Always"
|
||||
PostProcessAssembly="true" />
|
||||
<TrimmerRootAssembly Include="Uno.Wasm.AotProfiler" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="_UnoInjectHotReloadSupport"
|
||||
BeforeTargets="ResolveRuntimePackAssets"
|
||||
Condition=" '$(Optimize)' != 'true' ">
|
||||
<ItemGroup>
|
||||
<Reference Include="$(MSBuildThisFileDirectory)../tools/support/Uno.Wasm.MetadataUpdater.dll"
|
||||
CopyToOutputDirectory="Always"
|
||||
PostProcessAssembly="true" />
|
||||
<TrimmerRootAssembly Include="Uno.Wasm.MetadataUpdater" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="_WorkaroundEmscriptenPathLength"
|
||||
Condition=" '$(OS)' == 'Windows_NT' "
|
||||
BeforeTargets="_SetupEmscripten">
|
||||
|
@ -110,6 +123,7 @@
|
|||
<!-- Adjust the cache on windows if the drive is not the same -->
|
||||
<WasmCachePath Condition="
|
||||
'$(OS)' == 'Windows_NT'
|
||||
AND '$(EmscriptenSdkToolsPath)' != ''
|
||||
AND '$(EmscriptenSdkToolsPath.Substring(1))' != '$(MSBuildProjectDirectory.Substring(1))'
|
||||
">$(TMP)\emsdk-cache</WasmCachePath>
|
||||
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v7.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v7.0": {
|
||||
"Uno.Wasm.AotProfiler/1.0.0": {
|
||||
"dependencies": {
|
||||
"DotNet.ReproducibleBuilds": "1.1.1",
|
||||
"System.Memory": "4.5.2"
|
||||
},
|
||||
"runtime": {
|
||||
"Uno.Wasm.AotProfiler.dll": {}
|
||||
}
|
||||
},
|
||||
"DotNet.ReproducibleBuilds/1.1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.SourceLink.AzureRepos.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Bitbucket.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.GitHub": "1.1.1",
|
||||
"Microsoft.SourceLink.GitLab": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.Build.Tasks.Git/1.1.1": {},
|
||||
"Microsoft.SourceLink.AzureRepos.Git/1.1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.SourceLink.Bitbucket.Git/1.1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.SourceLink.Common/1.1.1": {},
|
||||
"Microsoft.SourceLink.GitHub/1.1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.SourceLink.GitLab/1.1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
},
|
||||
"System.Memory/4.5.2": {}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Uno.Wasm.AotProfiler/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"DotNet.ReproducibleBuilds/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-+H2t/t34h6mhEoUvHi8yGXyuZ2GjSovcGYehJrS2MDm2XgmPfZL2Sdxg+uL2lKgZ4M6tTwKHIlxOob2bgh0NRQ==",
|
||||
"path": "dotnet.reproduciblebuilds/1.1.1",
|
||||
"hashPath": "dotnet.reproduciblebuilds.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Build.Tasks.Git/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==",
|
||||
"path": "microsoft.build.tasks.git/1.1.1",
|
||||
"hashPath": "microsoft.build.tasks.git.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.SourceLink.AzureRepos.Git/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-qB5urvw9LO2bG3eVAkuL+2ughxz2rR7aYgm2iyrB8Rlk9cp2ndvGRCvehk3rNIhRuNtQaeKwctOl1KvWiklv5w==",
|
||||
"path": "microsoft.sourcelink.azurerepos.git/1.1.1",
|
||||
"hashPath": "microsoft.sourcelink.azurerepos.git.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.SourceLink.Bitbucket.Git/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-cDzxXwlyWpLWaH0em4Idj0H3AmVo3L/6xRXKssYemx+7W52iNskj/SQ4FOmfCb8YQt39otTDNMveCZzYtMoucQ==",
|
||||
"path": "microsoft.sourcelink.bitbucket.git/1.1.1",
|
||||
"hashPath": "microsoft.sourcelink.bitbucket.git.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.SourceLink.Common/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==",
|
||||
"path": "microsoft.sourcelink.common/1.1.1",
|
||||
"hashPath": "microsoft.sourcelink.common.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.SourceLink.GitHub/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
|
||||
"path": "microsoft.sourcelink.github/1.1.1",
|
||||
"hashPath": "microsoft.sourcelink.github.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.SourceLink.GitLab/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-tvsg47DDLqqedlPeYVE2lmiTpND8F0hkrealQ5hYltSmvruy/Gr5nHAKSsjyw5L3NeM/HLMI5ORv7on/M4qyZw==",
|
||||
"path": "microsoft.sourcelink.gitlab/1.1.1",
|
||||
"hashPath": "microsoft.sourcelink.gitlab.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"System.Memory/4.5.2": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-fvq1GNmUFwbKv+aLVYYdgu/+gc8Nu9oFujOxIjPrsf+meis9JBzTPDL6aP/eeGOz9yPj6rRLUbOjKMpsMEWpNg==",
|
||||
"path": "system.memory/4.5.2",
|
||||
"hashPath": "system.memory.4.5.2.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
Двоичный файл не отображается.
|
@ -0,0 +1,109 @@
|
|||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v8.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v8.0": {
|
||||
"Uno.Wasm.MetadataUpdater/1.0.0": {
|
||||
"dependencies": {
|
||||
"DotNet.ReproducibleBuilds": "1.1.1"
|
||||
},
|
||||
"runtime": {
|
||||
"Uno.Wasm.MetadataUpdater.dll": {}
|
||||
}
|
||||
},
|
||||
"DotNet.ReproducibleBuilds/1.1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.SourceLink.AzureRepos.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Bitbucket.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.GitHub": "1.1.1",
|
||||
"Microsoft.SourceLink.GitLab": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.Build.Tasks.Git/1.1.1": {},
|
||||
"Microsoft.SourceLink.AzureRepos.Git/1.1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.SourceLink.Bitbucket.Git/1.1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.SourceLink.Common/1.1.1": {},
|
||||
"Microsoft.SourceLink.GitHub/1.1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
},
|
||||
"Microsoft.SourceLink.GitLab/1.1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Build.Tasks.Git": "1.1.1",
|
||||
"Microsoft.SourceLink.Common": "1.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Uno.Wasm.MetadataUpdater/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"DotNet.ReproducibleBuilds/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-+H2t/t34h6mhEoUvHi8yGXyuZ2GjSovcGYehJrS2MDm2XgmPfZL2Sdxg+uL2lKgZ4M6tTwKHIlxOob2bgh0NRQ==",
|
||||
"path": "dotnet.reproduciblebuilds/1.1.1",
|
||||
"hashPath": "dotnet.reproduciblebuilds.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Build.Tasks.Git/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==",
|
||||
"path": "microsoft.build.tasks.git/1.1.1",
|
||||
"hashPath": "microsoft.build.tasks.git.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.SourceLink.AzureRepos.Git/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-qB5urvw9LO2bG3eVAkuL+2ughxz2rR7aYgm2iyrB8Rlk9cp2ndvGRCvehk3rNIhRuNtQaeKwctOl1KvWiklv5w==",
|
||||
"path": "microsoft.sourcelink.azurerepos.git/1.1.1",
|
||||
"hashPath": "microsoft.sourcelink.azurerepos.git.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.SourceLink.Bitbucket.Git/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-cDzxXwlyWpLWaH0em4Idj0H3AmVo3L/6xRXKssYemx+7W52iNskj/SQ4FOmfCb8YQt39otTDNMveCZzYtMoucQ==",
|
||||
"path": "microsoft.sourcelink.bitbucket.git/1.1.1",
|
||||
"hashPath": "microsoft.sourcelink.bitbucket.git.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.SourceLink.Common/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==",
|
||||
"path": "microsoft.sourcelink.common/1.1.1",
|
||||
"hashPath": "microsoft.sourcelink.common.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.SourceLink.GitHub/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
|
||||
"path": "microsoft.sourcelink.github/1.1.1",
|
||||
"hashPath": "microsoft.sourcelink.github.1.1.1.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.SourceLink.GitLab/1.1.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-tvsg47DDLqqedlPeYVE2lmiTpND8F0hkrealQ5hYltSmvruy/Gr5nHAKSsjyw5L3NeM/HLMI5ORv7on/M4qyZw==",
|
||||
"path": "microsoft.sourcelink.gitlab/1.1.1",
|
||||
"hashPath": "microsoft.sourcelink.gitlab.1.1.1.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
Двоичный файл не отображается.
|
@ -270,8 +270,7 @@ namespace Uno.WebAssembly.Bootstrap {
|
|||
try {
|
||||
this.attachDebuggerHotkey();
|
||||
|
||||
console.error("UNO TODO HOT RELOAD IS DISABLED");
|
||||
//await this.setupHotReload();
|
||||
await this.setupHotReload();
|
||||
|
||||
if (this._hotReloadSupport) {
|
||||
await this._hotReloadSupport.initializeHotReload();
|
||||
|
|
|
@ -1,50 +1,23 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Runtime.InteropServices.JavaScript;
|
||||
|
||||
namespace WebAssembly
|
||||
{
|
||||
internal sealed class Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// Mono specific internal call.
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern string InvokeJS(string str, out int exceptional_result);
|
||||
|
||||
// Disable inlining to avoid the interpreter to evaluate an internal call that may not be available
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static string MonoInvokeJS(string str, out int exceptionResult) => InvokeJS(str, out exceptionResult);
|
||||
|
||||
// Disable inlining to avoid the interpreter to evaluate an internal call that may not be available
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static string NetCoreInvokeJS(string str, out int exceptionResult)
|
||||
=> Interop.Runtime.InvokeJS(str, out exceptionResult);
|
||||
|
||||
/// <summary>
|
||||
/// Invokes Javascript code in the hosting environment
|
||||
/// </summary>
|
||||
internal static string InvokeJS(string str)
|
||||
{
|
||||
var r = IsNetCore
|
||||
? NetCoreInvokeJS(str, out var exceptionResult)
|
||||
: MonoInvokeJS(str, out exceptionResult);
|
||||
|
||||
if (exceptionResult != 0)
|
||||
{
|
||||
Console.Error.WriteLine($"Error #{exceptionResult} \"{r}\" executing javascript: \"{str}\"");
|
||||
}
|
||||
return r;
|
||||
=> Interop.InvokeJS(str);
|
||||
}
|
||||
|
||||
internal static bool IsNetCore { get; } = Type.GetType("System.Runtime.Loader.AssemblyLoadContext") != null;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class Interop
|
||||
internal static partial class Interop
|
||||
{
|
||||
internal sealed class Runtime
|
||||
{
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
public static extern string InvokeJS(string str, out int exceptional_result);
|
||||
[JSImport("globalThis.Uno.WebAssembly.Bootstrap.Bootstrapper.invokeJS")]
|
||||
public static partial string InvokeJS(string value);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче