Skip to content

[main] Update dependencies from dotnet/runtime dotnet/efcore #49704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
ed5e135
Update dependencies from https://github.com/dotnet/runtime build 2023…
dotnet-maestro[bot] Jul 28, 2023
88a5418
Update dependencies from https://github.com/dotnet/efcore build 20230…
dotnet-maestro[bot] Jul 28, 2023
526488b
Update dependencies from https://github.com/dotnet/runtime build 2023…
dotnet-maestro[bot] Jul 29, 2023
9386cb0
Update dependencies from https://github.com/dotnet/runtime build 2023…
dotnet-maestro[bot] Jul 30, 2023
0cdfd75
React to the new NativeAOT annotations in EF
AndriySvyryd Jul 30, 2023
2bfddbd
Update dependencies from https://github.com/dotnet/runtime build 2023…
dotnet-maestro[bot] Jul 31, 2023
2ff0dfb
Update dependencies from https://github.com/dotnet/efcore build 20230…
dotnet-maestro[bot] Jul 31, 2023
3c1d4a9
Update dependencies from https://github.com/dotnet/efcore build 20230…
dotnet-maestro[bot] Jul 31, 2023
e27886b
Merge remote-tracking branch 'origin/main' into darc-main-42aacfbe-ed…
sebastienros Aug 1, 2023
2e06b66
Update dependencies from https://github.com/dotnet/efcore build 20230…
dotnet-maestro[bot] Aug 1, 2023
7e65689
Update dependencies from https://github.com/dotnet/runtime build 2023…
dotnet-maestro[bot] Aug 1, 2023
7b28b3e
Update dependencies from https://github.com/dotnet/efcore build 20230…
dotnet-maestro[bot] Aug 1, 2023
9c7b80c
cleanup of the wasm runtime dependency
pavelsavara Aug 1, 2023
e560c95
Update dependencies from https://github.com/dotnet/efcore build 20230…
dotnet-maestro[bot] Aug 1, 2023
eb3093a
Update dependencies from https://github.com/dotnet/runtime build 2023…
dotnet-maestro[bot] Aug 2, 2023
fce7ba9
Update dependencies from https://github.com/dotnet/runtime build 2023…
dotnet-maestro[bot] Aug 2, 2023
b75138c
Update dependencies from https://github.com/dotnet/efcore build 20230…
dotnet-maestro[bot] Aug 2, 2023
edccd73
active issue https://github.com/dotnet/runtime/issues/89883
pavelsavara Aug 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
308 changes: 154 additions & 154 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

154 changes: 77 additions & 77 deletions eng/Versions.props

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions src/Components/Web.JS/@types/dotnet/dotnet-legacy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,6 @@ type MONOType = {
* @deprecated Please use config.assets instead
*/
mono_wasm_runtime_ready: () => void;
/**
* @deprecated Please use config.assets instead
*/
mono_wasm_load_data_archive: (data: Uint8Array, prefix: string) => boolean;
/**
* @deprecated Please use configSrc instead
*/
mono_wasm_load_config: (configFilePath: string) => Promise<void>;
/**
* @deprecated Please use runMain instead
*/
mono_load_runtime_and_bcl_args: Function;
/**
* @deprecated Please use [JSImportAttribute] or [JSExportAttribute] for interop instead.
*/
Expand Down
179 changes: 94 additions & 85 deletions src/Components/Web.JS/@types/dotnet/dotnet.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//!
//! This is generated file, see src/mono/wasm/runtime/rollup.config.js

//! This is not considered public API with backward compatibility guarantees.
//! This is not considered public API with backward compatibility guarantees.

declare interface NativePointer {
__brandNativePointer: "NativePointer";
Expand Down Expand Up @@ -63,6 +63,9 @@ declare interface EmscriptenModule {
onAbort?: {
(error: any): void;
};
onExit?: {
(code: number): void;
};
}
type InstantiateWasmSuccessCallback = (instance: WebAssembly.Instance, module: WebAssembly.Module | undefined) => void;
type InstantiateWasmCallBack = (imports: WebAssembly.Imports, successCallback: InstantiateWasmSuccessCallback) => any;
Expand Down Expand Up @@ -92,14 +95,6 @@ interface DotnetHostBuilder {
run(): Promise<number>;
}
type MonoConfig = {
/**
* The subfolder containing managed assemblies and pdbs. This is relative to dotnet.js script.
*/
assemblyRootFolder?: string;
/**
* A list of assets to load along with the runtime.
*/
assets?: AssetEntry[];
/**
* Additional search locations for assets.
*/
Expand Down Expand Up @@ -130,6 +125,10 @@ type MonoConfig = {
* debugLevel < 0 enables debugging and disables debug logging.
*/
debugLevel?: number;
/**
* Gets a value that determines whether to enable caching of the 'resources' inside a CacheStorage instance within the browser.
*/
cacheBootResources?: boolean;
/**
* Enables diagnostic log messages during startup
*/
Expand All @@ -148,10 +147,6 @@ type MonoConfig = {
* If true, the snapshot of runtime's memory will be stored in the browser and used for faster startup next time. Default is false.
*/
startupMemoryCache?: boolean;
/**
* hash of assets
*/
assetsHash?: string;
/**
* application environment
*/
Expand All @@ -164,6 +159,10 @@ type MonoConfig = {
* definition of assets to load along with the runtime.
*/
resources?: ResourceGroups;
/**
* appsettings files to load to VFS
*/
appsettings?: string[];
/**
* config extensions declared in MSBuild items @(WasmBootConfigExtension)
*/
Expand All @@ -175,25 +174,31 @@ type ResourceExtensions = {
[extensionName: string]: ResourceList;
};
interface ResourceGroups {
readonly hash?: string;
readonly assembly?: ResourceList;
readonly lazyAssembly?: ResourceList;
readonly pdb?: ResourceList;
readonly runtime?: ResourceList;
readonly satelliteResources?: {
hash?: string;
assembly?: ResourceList;
lazyAssembly?: ResourceList;
pdb?: ResourceList;
jsModuleWorker?: ResourceList;
jsModuleNative: ResourceList;
jsModuleRuntime: ResourceList;
wasmSymbols?: ResourceList;
wasmNative: ResourceList;
icu?: ResourceList;
satelliteResources?: {
[cultureName: string]: ResourceList;
};
readonly libraryInitializers?: {
readonly onRuntimeConfigLoaded: ResourceList;
readonly onRuntimeReady: ResourceList;
};
readonly extensions?: ResourceExtensions;
readonly vfs?: {
modulesAfterConfigLoaded?: ResourceList;
modulesAfterRuntimeReady?: ResourceList;
extensions?: ResourceExtensions;
vfs?: {
[virtualPath: string]: ResourceList;
};
}
/**
* A "key" is name of the file, a "value" is optional hash for integrity check.
*/
type ResourceList = {
[name: string]: string;
[name: string]: string | null | "";
};
/**
* Overrides the built-in boot resource loading mechanism so that boot resources can be fetched
Expand All @@ -203,13 +208,14 @@ type ResourceList = {
* @param defaultUri The URI from which the framework would fetch the resource by default. The URI may be relative or absolute.
* @param integrity The integrity string representing the expected content in the response.
* @returns A URI string or a Response promise to override the loading process, or null/undefined to allow the default loading behavior.
* When returned string is not qualified with `./` or absolute URL, it will be resolved against the application base URI.
*/
type LoadBootResourceCallback = (type: WebAssemblyBootResourceType, name: string, defaultUri: string, integrity: string) => string | Promise<Response> | null | undefined;
type LoadBootResourceCallback = (type: WebAssemblyBootResourceType, name: string, defaultUri: string, integrity: string, behavior: AssetBehaviors) => string | Promise<Response> | null | undefined;
interface ResourceRequest {
name: string;
behavior: AssetBehaviours;
behavior: AssetBehaviors;
resolvedUrl?: string;
hash?: string;
hash?: string | null | "";
}
interface LoadingResource {
name: string;
Expand Down Expand Up @@ -244,59 +250,64 @@ interface AssetEntry extends ResourceRequest {
*/
pendingDownload?: LoadingResource;
}
type AssetBehaviours =
/**
* Load asset as a managed resource assembly.
*/
"resource"
/**
* Load asset as a managed assembly.
*/
| "assembly"
/**
* Load asset as a managed debugging information.
*/
| "pdb"
/**
* Store asset into the native heap.
*/
| "heap"
/**
* Load asset as an ICU data archive.
*/
| "icu"
/**
* Load asset into the virtual filesystem (for fopen, File.Open, etc).
*/
| "vfs"
/**
* The binary of the dotnet runtime.
*/
| "dotnetwasm"
/**
* The javascript module for threads.
*/
| "js-module-threads"
/**
* The javascript module for threads.
*/
| "js-module-runtime"
/**
* The javascript module for threads.
*/
| "js-module-dotnet"
/**
* The javascript module for threads.
*/
| "js-module-native"
/**
* The javascript module that came from nuget package .
*/
| "js-module-library-initializer"
/**
* The javascript module for threads.
*/
| "symbols";
type SingleAssetBehaviors =
/**
* The binary of the dotnet runtime.
*/
"dotnetwasm"
/**
* The javascript module for loader.
*/
| "js-module-dotnet"
/**
* The javascript module for threads.
*/
| "js-module-threads"
/**
* The javascript module for runtime.
*/
| "js-module-runtime"
/**
* The javascript module for emscripten.
*/
| "js-module-native"
/**
* Typically blazor.boot.json
*/
| "manifest";
type AssetBehaviors = SingleAssetBehaviors |
/**
* Load asset as a managed resource assembly.
*/
"resource"
/**
* Load asset as a managed assembly.
*/
| "assembly"
/**
* Load asset as a managed debugging information.
*/
| "pdb"
/**
* Store asset into the native heap.
*/
| "heap"
/**
* Load asset as an ICU data archive.
*/
| "icu"
/**
* Load asset into the virtual filesystem (for fopen, File.Open, etc).
*/
| "vfs"
/**
* The javascript module that came from nuget package .
*/
| "js-module-library-initializer"
/**
* The javascript module for threads.
*/
| "symbols";
declare const enum GlobalizationMode {
/**
* Load sharded ICU data.
Expand Down Expand Up @@ -326,10 +337,8 @@ type DotnetModuleConfig = {
onConfigLoaded?: (config: MonoConfig) => void | Promise<void>;
onDotnetReady?: () => void | Promise<void>;
onDownloadResourceProgress?: (resourcesLoaded: number, totalResources: number) => void;
getApplicationEnvironment?: (bootConfigResponse: Response) => string | null;
imports?: any;
exports?: string[];
downloadResource?: (request: ResourceRequest) => LoadingResource | undefined;
} & Partial<EmscriptenModule>;
type APIType = {
runMain: (mainAssemblyName: string, args: string[]) => Promise<number>;
Expand Down Expand Up @@ -432,4 +441,4 @@ declare global {
}
declare const createDotnetRuntime: CreateDotnetRuntimeType;

export { AssetEntry, CreateDotnetRuntimeType, DotnetHostBuilder, DotnetModuleConfig, EmscriptenModule, GlobalizationMode, IMemoryView, ModuleAPI, MonoConfig, ResourceRequest, RuntimeAPI, createDotnetRuntime as default, dotnet, exit };
export { AssetBehaviors, AssetEntry, CreateDotnetRuntimeType, DotnetHostBuilder, DotnetModuleConfig, EmscriptenModule, GlobalizationMode, IMemoryView, ModuleAPI, MonoConfig, ResourceRequest, RuntimeAPI, createDotnetRuntime as default, dotnet, exit };
3 changes: 1 addition & 2 deletions src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async function importDotnetJs(startOptions: Partial<WebAssemblyStartOptions>): P
// Allow overriding the URI from which the dotnet.*.js file is loaded
if (startOptions.loadBootResource) {
const resourceType: WebAssemblyBootResourceType = 'dotnetjs';
const customSrc = startOptions.loadBootResource(resourceType, 'dotnet.js', src, '');
const customSrc = startOptions.loadBootResource(resourceType, 'dotnet.js', src, '', 'js-module-dotnet');
if (typeof (customSrc) === 'string') {
src = customSrc;
} else if (customSrc) {
Expand Down Expand Up @@ -197,7 +197,6 @@ function prepareRuntimeConfig(options: Partial<WebAssemblyStartOptions>): Dotnet
};

const moduleConfig = (window['Module'] || {}) as typeof Module;
// TODO (moduleConfig as any).preloadPlugins = []; // why do we need this ?
const dotnetModuleConfig: DotnetModuleConfig = {
...moduleConfig,
onConfigLoaded: (onConfigLoaded as (config: MonoConfig) => void | Promise<void>),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

import { DotnetHostBuilder } from 'dotnet';
import { DotnetHostBuilder, AssetBehaviors } from 'dotnet';

export interface WebAssemblyStartOptions {
/**
Expand All @@ -11,9 +11,11 @@ export interface WebAssemblyStartOptions {
* @param name The name of the resource to be loaded.
* @param defaultUri The URI from which the framework would fetch the resource by default. The URI may be relative or absolute.
* @param integrity The integrity string representing the expected content in the response.
* @param behavior The detailed behavior/type of the resource to be loaded.
* @returns A URI string or a Response promise to override the loading process, or null/undefined to allow the default loading behavior.
* When returned string is not qualified with `./` or absolute URL, it will be resolved against document.baseURI.
*/
loadBootResource(type: WebAssemblyBootResourceType, name: string, defaultUri: string, integrity: string): string | Promise<Response> | null | undefined;
loadBootResource(type: WebAssemblyBootResourceType, name: string, defaultUri: string, integrity: string, behavior: AssetBehaviors): string | Promise<Response> | null | undefined;

/**
* Override built-in environment setting on start.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public override Task InitializeAsync()
return base.InitializeAsync(Guid.NewGuid().ToString());
}

/* Active Issue https://github.com/dotnet/runtime/issues/89883
[Fact]
public void CachesResourcesAfterFirstLoad()
{
Expand Down Expand Up @@ -97,6 +98,7 @@ public void IncrementallyUpdatesCache()
Assert.Contains(cacheEntryForDotNetWasm, cacheEntryUrls3);
Assert.DoesNotContain(cacheEntryForDotNetWasmWithChangedHash, cacheEntryUrls3);
}
*/

private IReadOnlyCollection<string> GetCacheEntryUrls()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
disableDomPreservation: suppressEnhancedNavigation,
},
webAssembly: {
loadBootResource: function (type, name, defaultUri, integrity) {
loadBootResource: function (type, name, defaultUri, integrity, behavior) {
// note this is resolved to absolute URL using document.baseURI
return `WasmMinimal/_framework/${name}`;
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Data.Common;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Views;
Expand All @@ -20,6 +21,7 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore;
/// <remarks>
/// This should only be enabled in the Development environment.
/// </remarks>
[RequiresDynamicCode("DbContext migrations operations are not supported with NativeAOT")]
public sealed class DatabaseDeveloperPageExceptionFilter : IDeveloperPageExceptionFilter
{
private readonly ILogger _logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection.Extensions;
Expand All @@ -21,6 +22,7 @@ public static class DatabaseDeveloperPageExceptionFilterServiceExtensions
/// <remarks>
/// This should only be enabled in the Development environment.
/// </remarks>
[RequiresDynamicCode("DbContext migrations operations are not supported with NativeAOT")]
public static IServiceCollection AddDatabaseDeveloperPageExceptionFilter(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
Expand Down
Loading