Update dependencies from dotnet/blazor (#18424)

* Update dependencies from dotnet/blazor

* Update version of blazor package used

* Removed obsolete WipedMethod invocation test

* react to mono.wasm to dotnet.wasm rename

* Leftover code cleanup
This commit is contained in:
William Godbe 2020-01-17 15:56:08 -08:00 committed by GitHub
parent e64b8a91ad
commit 1f61fc6cb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 35 additions and 63 deletions

View File

@ -9,9 +9,9 @@
-->
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="3.1.0-preview4.19578.1">
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="3.2.0-preview1.20067.1">
<Uri>https://github.com/aspnet/Blazor</Uri>
<Sha>9ff01af4257317a90b64959fe1c87aef3da4a36f</Sha>
<Sha>dd7fb4d3931d556458f62642c2edfc59f6295bfb</Sha>
</Dependency>
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="3.1.0-rtm.19573.1">
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
@ -281,10 +281,6 @@
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
</Dependency>
<Dependency Name="Microsoft.Internal.Extensions.Refs" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
</Dependency>
<Dependency Name="Microsoft.JSInterop" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
<Uri>https://github.com/aspnet/Extensions</Uri>
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>

View File

@ -97,7 +97,7 @@
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
<MicrosoftNETCorePlatformsPackageVersion>3.1.0</MicrosoftNETCorePlatformsPackageVersion>
<!-- Packages from aspnet/Blazor -->
<MicrosoftAspNetCoreBlazorMonoPackageVersion>3.1.0-preview4.19578.1</MicrosoftAspNetCoreBlazorMonoPackageVersion>
<MicrosoftAspNetCoreBlazorMonoPackageVersion>3.2.0-preview1.20067.1</MicrosoftAspNetCoreBlazorMonoPackageVersion>
<!-- Packages from aspnet/Extensions -->
<InternalAspNetCoreAnalyzersPackageVersion>3.1.0-rtm.19575.5</InternalAspNetCoreAnalyzersPackageVersion>
<MicrosoftAspNetCoreAnalyzerTestingPackageVersion>3.1.0-rtm.19575.5</MicrosoftAspNetCoreAnalyzerTestingPackageVersion>

View File

@ -6,7 +6,7 @@
<PropertyGroup Label="Blazor build outputs">
<MonoLinkerI18NAssemblies>none</MonoLinkerI18NAssemblies> <!-- See Mono linker docs - allows comma-separated values from: none,all,cjk,mideast,other,rare,west -->
<AdditionalMonoLinkerOptions>--disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com --exclude-feature sre -v false -c link -u link -b true</AdditionalMonoLinkerOptions>
<AdditionalMonoLinkerOptions>--disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com -v false -c link -u link -b true</AdditionalMonoLinkerOptions>
<BaseBlazorDistPath>dist\</BaseBlazorDistPath>
<BaseBlazorPackageContentOutputPath>$(BaseBlazorDistPath)_content\</BaseBlazorPackageContentOutputPath>
<BaseBlazorRuntimeOutputPath>$(BaseBlazorDistPath)_framework\</BaseBlazorRuntimeOutputPath>

View File

@ -22,8 +22,8 @@ namespace Microsoft.AspNetCore.Blazor.Build
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.wasm");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.js");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.js");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
}
@ -65,8 +65,8 @@ namespace Microsoft.AspNetCore.Blazor.Build
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.wasm");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.js");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.js");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
}

View File

@ -23,8 +23,8 @@ namespace Microsoft.AspNetCore.Blazor.Build
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
@ -57,8 +57,8 @@ namespace Microsoft.AspNetCore.Blazor.Build
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
@ -96,8 +96,8 @@ namespace Microsoft.AspNetCore.Blazor.Build
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
@ -158,8 +158,8 @@ namespace Microsoft.AspNetCore.Blazor.Build
var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
@ -201,8 +201,8 @@ namespace Microsoft.AspNetCore.Blazor.Build
var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.

View File

@ -36,14 +36,6 @@
</form>
</fieldset>
<fieldset>
<legend>Invoke wiped method</legend>
<form id="invokeWipedMethod">
<button type="submit" disabled>Go</button>
<div><textarea rows="5" cols="80" readonly id="invokeWipedMethodStackTrace"></textarea></div>
</form>
</fieldset>
<fieldset>
<legend>Call JS from .NET</legend>
<form id="callJs">
@ -111,16 +103,6 @@
}
};
el('invokeWipedMethod').onsubmit = function (evt) {
evt.preventDefault();
try {
invokeMonoMethod('MonoSanityClient', 'MonoSanityClient', 'Examples', 'InvokeWipedMethod', []);
el('invokeWipedMethodStackTrace').value = 'WARNING: No exception occurred';
} catch (ex) {
el('invokeWipedMethodStackTrace').value = ex.toString();
}
};
el('callJs').onsubmit = function (evt) {
evt.preventDefault();
var expression = el('callJsEvalExpression').value;

View File

@ -12,7 +12,7 @@
window.initMono = function initMono(loadAssemblyUrls, onReadyCallback) {
window.Module = {
locateFile: function (fileName) {
return fileName === 'mono.wasm' ? '/_framework/wasm/mono.wasm' : fileName;
return fileName === 'dotnet.wasm' ? '/_framework/wasm/dotnet.wasm' : fileName;
},
onRuntimeInitialized: function () {
var allAssemblyUrls = loadAssemblyUrls.concat([
@ -117,7 +117,7 @@
}
var scriptElem = document.createElement('script');
scriptElem.src = '/_framework/wasm/mono.js';
scriptElem.src = '/_framework/wasm/dotnet.js';
document.body.appendChild(scriptElem);
}

View File

@ -31,11 +31,6 @@ namespace MonoSanityClient
throw new InvalidOperationException(message);
}
public static void InvokeWipedMethod()
{
new HttpClientHandler().Dispose();
}
public static string EvaluateJavaScript(string expression)
{
var result = InternalCalls.InvokeJSUnmarshalled<string, string, object, object>(out var exceptionMessage, "evaluateJsExpression", expression, null, null);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@ export const monoPlatform: Platform = {
return new Promise<void>((resolve, reject) => {
attachDebuggerHotkey(loadAssemblyUrls);
// mono.js assumes the existence of this
// dotnet.js assumes the existence of this
window['Browser'] = {
init: () => { },
};
@ -118,7 +118,7 @@ function addScriptTagsToDocument() {
}
const scriptElem = document.createElement('script');
scriptElem.src = '_framework/wasm/mono.js';
scriptElem.src = '_framework/wasm/dotnet.js';
scriptElem.defer = true;
document.body.appendChild(scriptElem);
}
@ -142,7 +142,7 @@ function addGlobalModuleScriptTagsToDocument(callback: () => void) {
function createEmscriptenModuleInstance(loadAssemblyUrls: string[], onReady: () => void, onError: (reason?: any) => void) {
const module = {} as typeof Module;
const wasmBinaryFile = '_framework/wasm/mono.wasm';
const wasmBinaryFile = '_framework/wasm/dotnet.wasm';
const suppressMessages = ['DEBUGGING ENABLED'];
module.print = line => (suppressMessages.indexOf(line) < 0 && console.log(`WASM: ${line}`));
@ -157,7 +157,7 @@ function createEmscriptenModuleInstance(loadAssemblyUrls: string[], onReady: ()
module.locateFile = fileName => {
switch (fileName) {
case 'mono.wasm': return wasmBinaryFile;
case 'dotnet.wasm': return wasmBinaryFile;
default: return fileName;
}
};

View File

@ -74,14 +74,6 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests
Assert.Contains("Hello from test", GetValue(Browser, "triggerExceptionMessageStackTrace"));
}
[Fact]
public void ProvidesDiagnosticIfInvokingWipedMethod()
{
Browser.FindElement(By.CssSelector("#invokeWipedMethod button")).Click();
Assert.Contains("System.NotImplementedException: Cannot invoke method because it was wiped. See stack trace for details.", GetValue(Browser, "invokeWipedMethodStackTrace"));
}
[Fact]
public void CanCallJavaScriptFromDotNet()
{