Skip to content

Commit

Permalink
[master] Update dependencies from dotnet/efcore dotnet/runtime (#27845)
Browse files Browse the repository at this point in the history
[master] Update dependencies from dotnet/efcore dotnet/runtime


 - Merge branch 'master' into darc-master-9396423e-d0e5-4256-b391-f59a31dec46d

 - Remove correct `...Version` property

 - Switch to net5.0. EFCore input dependencies switched to net5.0

 - Fix up nullability errors

 - Fix nullability errors in anti-forgery tests

 - Temporarily revert target framework changes

 - Revert "Temporarily revert target framework changes"

This reverts commit 3e3ec6a.

 - Don't target latest runtime for a few projs

 - Other property

 - Add to targeting pack version as well

 - oops

 - Try another combination

 - only two

 - Fix browser API usage

 - Merge remote-tracking branch 'upstream/master' into darc-master-9396423e-d0e5-4256-b391-f59a31dec46d

 - React to nullability breaks

 - Merge branch 'master' into darc-master-9396423e-d0e5-4256-b391-f59a31dec46d

 - Fixup after main branch merge

 - Fixup confusing merge

- apply suggestions from code review

 - Don't reference internal transport in repotools

 - Merge branch 'master' into darc-master-9396423e-d0e5-4256-b391-f59a31dec46d

 - Test fixes

 - Disable watcher tests

 - nullable?

 - remove enable
  • Loading branch information
dotnet-maestro[bot] committed Dec 10, 2020
1 parent 965eaff commit 2ceca7f
Show file tree
Hide file tree
Showing 25 changed files with 306 additions and 291 deletions.
292 changes: 146 additions & 146 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

146 changes: 73 additions & 73 deletions eng/Versions.props

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions eng/targets/ResolveReferences.targets
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@
If we have a ref/ assembly from dotnet/runtime for an Extension package, use that when compiling but do not reference its assemblies.
-->
<ItemGroup Condition=" '$(MSBuildProjectName)' != 'Microsoft.AspNetCore.App.Runtime' AND
'$(MSBuildProjectName)' != 'RepoTasks' AND
($(_CompileTfmUsingReferenceAssemblies) OR
('$(IsTargetingPackBuilding)' != 'false' AND '$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref')) ">
<PackageReference Include="Microsoft.Extensions.Internal.Transport"
Expand Down
2 changes: 2 additions & 0 deletions eng/tools/RepoTasks/RepoTasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!-- Need to build this project in source build -->
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
<!-- Temporarily target the previous runtime until https://github.com/dotnet/sdk/pull/14574 is merged. -->
<TargetLatestDotNetRuntime>false</TargetLatestDotNetRuntime>
<!-- No need to track public APIs of these MSBuild tasks. -->
<AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Antiforgery/test/DefaultAntiforgeryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ public void GetAndStoreTokens_DoesNotLogWarning_IfNoExistingCacheHeadersPresent(
var testSink = new TestSink();
var loggerFactory = new Mock<ILoggerFactory>();
loggerFactory
.Setup(lf => lf.CreateLogger(typeof(DefaultAntiforgery).FullName))
.Setup(lf => lf.CreateLogger(typeof(DefaultAntiforgery).FullName!))
.Returns(new TestLogger("test logger", testSink, enabled: true));
var services = new ServiceCollection();
services.AddSingleton(loggerFactory.Object);
Expand Down Expand Up @@ -1224,7 +1224,7 @@ public void GetAndStoreTokens_LogsWarning_NonNoCacheHeadersAlreadyPresent(string
var testSink = new TestSink();
var loggerFactory = new Mock<ILoggerFactory>();
loggerFactory
.Setup(lf => lf.CreateLogger(typeof(DefaultAntiforgery).FullName))
.Setup(lf => lf.CreateLogger(typeof(DefaultAntiforgery).FullName!))
.Returns(new TestLogger("test logger", testSink, enabled: true));
var services = new ServiceCollection();
services.AddSingleton(loggerFactory.Object);
Expand Down Expand Up @@ -1258,7 +1258,7 @@ public void GetAndStoreTokens_DoesNotLogsWarning_ForNoCacheHeaders_AlreadyPresen
var testSink = new TestSink();
var loggerFactory = new Mock<ILoggerFactory>();
loggerFactory
.Setup(lf => lf.CreateLogger(typeof(DefaultAntiforgery).FullName))
.Setup(lf => lf.CreateLogger(typeof(DefaultAntiforgery).FullName!))
.Returns(new TestLogger("test logger", testSink, enabled: true));
var services = new ServiceCollection();
services.AddSingleton(loggerFactory.Object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<!-- No need to track public APIs of these MSBuild tasks. -->
<AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>

<!-- Temporarily target the previous runtime until https://github.com/dotnet/sdk/pull/14574 is merged. -->
<TargetLatestDotNetRuntime>false</TargetLatestDotNetRuntime>

<IsShipping>false</IsShipping>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public bool IsEnabled(LogLevel logLevel)
return logLevel != LogLevel.None;
}

public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
{
if (!IsEnabled(logLevel))
{
Expand All @@ -68,7 +68,7 @@ public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Except
}
}

private void WriteMessage(LogLevel logLevel, string logName, int eventId, string message, Exception exception)
private void WriteMessage(LogLevel logLevel, string logName, int eventId, string message, Exception? exception)
{
lock (_logBuilder)
{
Expand Down Expand Up @@ -113,7 +113,7 @@ private void WriteMessage(LogLevel logLevel, string logName, int eventId, string
}
}

private void CreateDefaultLogMessage(StringBuilder logBuilder, LogLevel logLevel, string logName, int eventId, string message, Exception exception)
private void CreateDefaultLogMessage(StringBuilder logBuilder, LogLevel logLevel, string logName, int eventId, string message, Exception? exception)
{
logBuilder.Append(GetLogLevelString(logLevel));
logBuilder.Append(_loglevelPadding);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Support for storing keys using Entity Framework Core.</Description>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore;dataprotection;entityframeworkcore</PackageTags>
Expand Down
84 changes: 42 additions & 42 deletions src/Framework/test/TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,60 +230,60 @@ static TestData()
{ "Microsoft.AspNetCore.StaticFiles", "6.0.0.0" },
{ "Microsoft.AspNetCore.WebSockets", "6.0.0.0" },
{ "Microsoft.AspNetCore.WebUtilities", "6.0.0.0" },
{ "Microsoft.Extensions.Caching.Abstractions", "5.0.0.0" },
{ "Microsoft.Extensions.Caching.Memory", "5.0.0.0" },
{ "Microsoft.Extensions.Configuration", "5.0.0.0" },
{ "Microsoft.Extensions.Configuration.Abstractions", "5.0.0.0" },
{ "Microsoft.Extensions.Configuration.Binder", "5.0.0.0" },
{ "Microsoft.Extensions.Configuration.CommandLine", "5.0.0.0" },
{ "Microsoft.Extensions.Configuration.EnvironmentVariables", "5.0.0.0" },
{ "Microsoft.Extensions.Configuration.FileExtensions", "5.0.0.0" },
{ "Microsoft.Extensions.Configuration.Ini", "5.0.0.0" },
{ "Microsoft.Extensions.Configuration.Json", "5.0.0.0" },
{ "Microsoft.Extensions.Caching.Abstractions", "6.0.0.0" },
{ "Microsoft.Extensions.Caching.Memory", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration.Abstractions", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration.Binder", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration.CommandLine", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration.EnvironmentVariables", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration.FileExtensions", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration.Ini", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration.Json", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration.KeyPerFile", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration.UserSecrets", "5.0.0.0" },
{ "Microsoft.Extensions.Configuration.Xml", "5.0.0.0" },
{ "Microsoft.Extensions.DependencyInjection", "5.0.0.0" },
{ "Microsoft.Extensions.DependencyInjection.Abstractions", "5.0.0.0" },
{ "Microsoft.Extensions.Configuration.UserSecrets", "6.0.0.0" },
{ "Microsoft.Extensions.Configuration.Xml", "6.0.0.0" },
{ "Microsoft.Extensions.DependencyInjection", "6.0.0.0" },
{ "Microsoft.Extensions.DependencyInjection.Abstractions", "6.0.0.0" },
{ "Microsoft.Extensions.Diagnostics.HealthChecks", "6.0.0.0" },
{ "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions", "6.0.0.0" },
{ "Microsoft.Extensions.FileProviders.Abstractions", "5.0.0.0" },
{ "Microsoft.Extensions.FileProviders.Composite", "5.0.0.0" },
{ "Microsoft.Extensions.FileProviders.Abstractions", "6.0.0.0" },
{ "Microsoft.Extensions.FileProviders.Composite", "6.0.0.0" },
{ "Microsoft.Extensions.FileProviders.Embedded", "6.0.0.0" },
{ "Microsoft.Extensions.FileProviders.Physical", "5.0.0.0" },
{ "Microsoft.Extensions.FileSystemGlobbing", "5.0.0.0" },
{ "Microsoft.Extensions.Hosting", "5.0.0.0" },
{ "Microsoft.Extensions.Hosting.Abstractions", "5.0.0.0" },
{ "Microsoft.Extensions.Http", "5.0.0.0" },
{ "Microsoft.Extensions.FileProviders.Physical", "6.0.0.0" },
{ "Microsoft.Extensions.FileSystemGlobbing", "6.0.0.0" },
{ "Microsoft.Extensions.Hosting", "6.0.0.0" },
{ "Microsoft.Extensions.Hosting.Abstractions", "6.0.0.0" },
{ "Microsoft.Extensions.Http", "6.0.0.0" },
{ "Microsoft.Extensions.Identity.Core", "6.0.0.0" },
{ "Microsoft.Extensions.Identity.Stores", "6.0.0.0" },
{ "Microsoft.Extensions.Localization", "6.0.0.0" },
{ "Microsoft.Extensions.Localization.Abstractions", "6.0.0.0" },
{ "Microsoft.Extensions.Logging", "5.0.0.0" },
{ "Microsoft.Extensions.Logging.Abstractions", "5.0.0.0" },
{ "Microsoft.Extensions.Logging.Configuration", "5.0.0.0" },
{ "Microsoft.Extensions.Logging.Console", "5.0.0.0" },
{ "Microsoft.Extensions.Logging.Debug", "5.0.0.0" },
{ "Microsoft.Extensions.Logging.EventLog", "5.0.0.0" },
{ "Microsoft.Extensions.Logging.EventSource", "5.0.0.0" },
{ "Microsoft.Extensions.Logging.TraceSource", "5.0.0.0" },
{ "Microsoft.Extensions.Logging", "6.0.0.0" },
{ "Microsoft.Extensions.Logging.Abstractions", "6.0.0.0" },
{ "Microsoft.Extensions.Logging.Configuration", "6.0.0.0" },
{ "Microsoft.Extensions.Logging.Console", "6.0.0.0" },
{ "Microsoft.Extensions.Logging.Debug", "6.0.0.0" },
{ "Microsoft.Extensions.Logging.EventLog", "6.0.0.0" },
{ "Microsoft.Extensions.Logging.EventSource", "6.0.0.0" },
{ "Microsoft.Extensions.Logging.TraceSource", "6.0.0.0" },
{ "Microsoft.Extensions.ObjectPool", "6.0.0.0" },
{ "Microsoft.Extensions.Options", "5.0.0.0" },
{ "Microsoft.Extensions.Options.ConfigurationExtensions", "5.0.0.0" },
{ "Microsoft.Extensions.Options.DataAnnotations", "5.0.0.0" },
{ "Microsoft.Extensions.Primitives", "5.0.0.0" },
{ "Microsoft.Extensions.Options", "6.0.0.0" },
{ "Microsoft.Extensions.Options.ConfigurationExtensions", "6.0.0.0" },
{ "Microsoft.Extensions.Options.DataAnnotations", "6.0.0.0" },
{ "Microsoft.Extensions.Primitives", "6.0.0.0" },
{ "Microsoft.Extensions.WebEncoders", "6.0.0.0" },
{ "Microsoft.JSInterop", "6.0.0.0" },
{ "Microsoft.Net.Http.Headers", "6.0.0.0" },
{ "Microsoft.Win32.Registry", "5.0.0.0" },
{ "System.Diagnostics.EventLog", "5.0.0.0" },
{ "System.IO.Pipelines", "5.0.0.0" },
{ "System.Security.AccessControl", "5.0.0.0" },
{ "System.Security.Cryptography.Cng", "5.0.0.0" },
{ "System.Security.Cryptography.Xml", "5.0.0.0" },
{ "System.Security.Permissions", "5.0.0.0" },
{ "System.Security.Principal.Windows", "5.0.0.0" },
{ "System.Windows.Extensions", "5.0.0.0" }
{ "Microsoft.Win32.Registry", "6.0.0.0" },
{ "System.Diagnostics.EventLog", "6.0.0.0" },
{ "System.IO.Pipelines", "6.0.0.0" },
{ "System.Security.AccessControl", "6.0.0.0" },
{ "System.Security.Cryptography.Cng", "6.0.0.0" },
{ "System.Security.Cryptography.Xml", "6.0.0.0" },
{ "System.Security.Permissions", "6.0.0.0" },
{ "System.Security.Principal.Windows", "6.0.0.0" },
{ "System.Windows.Extensions", "6.0.0.0" }
};

if (!VerifyAncmBinary())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Hosting

internal class HostingRequestFinishedLog : IReadOnlyList<KeyValuePair<string, object?>>
{
internal static readonly Func<object, Exception, string> Callback = (state, exception) => ((HostingRequestFinishedLog)state).ToString();
internal static readonly Func<object, Exception?, string> Callback = (state, exception) => ((HostingRequestFinishedLog)state).ToString();

private readonly HostingApplication.Context _context;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal class HostingRequestStartingLog : IReadOnlyList<KeyValuePair<string, ob
private const string LogPreamble = "Request starting ";
private const string EmptyEntry = "-";

internal static readonly Func<object, Exception, string> Callback = (state, exception) => ((HostingRequestStartingLog)state).ToString();
internal static readonly Func<object, Exception?, string> Callback = (state, exception) => ((HostingRequestStartingLog)state).ToString();

private readonly HttpRequest _request;

Expand Down
4 changes: 2 additions & 2 deletions src/Http/Routing/src/RouteBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ private void EnsureLoggers(HttpContext context)
}

var factory = context.RequestServices.GetRequiredService<ILoggerFactory>();
_constraintLogger = factory.CreateLogger(typeof(RouteConstraintMatcher).FullName);
_logger = factory.CreateLogger(typeof(RouteBase).FullName);
_constraintLogger = factory.CreateLogger(typeof(RouteConstraintMatcher).FullName!);
_logger = factory.CreateLogger(typeof(RouteBase).FullName!);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>ASP.NET Core Identity provider that uses Entity Framework Core.</Description>
<TargetFrameworks>netstandard2.1;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<TargetFrameworks>net5.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore;entityframeworkcore;identity;membership</PackageTags>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>
Components for performing health checks using EntityFrameworkCore.
</Description>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>diagnostics;healthchecks;entityframeworkcore</PackageTags>
<BaseNamespace>Microsoft.Extensions.Diagnostics.HealthChecks</BaseNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

<!-- Work around https://github.com/microsoft/msbuild/issues/4740 -->
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
<!-- Temporarily target the previous runtime until https://github.com/dotnet/sdk/pull/14574 is merged. -->
<TargetLatestDotNetRuntime>false</TargetLatestDotNetRuntime>

<!-- Tests do not work on Helix yet -->
<BuildHelixPayload>false</BuildHelixPayload>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<!-- No need to track public APIs of these MSBuild tasks. -->
<AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>

<TargetLatestDotNetRuntime>false</TargetLatestDotNetRuntime>
<IsShipping>false</IsShipping>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected string CurrentUri
/// <param name="clock">The <see cref="ISystemClock"/>.</param>
protected AuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock)
{
Logger = logger.CreateLogger(this.GetType().FullName);
Logger = logger.CreateLogger(this.GetType().FullName!);
UrlEncoder = encoder;
Clock = clock;
OptionsMonitor = options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void InvalidResponseHeaderRemoved()
_invalidResponseHeaderRemoved(_logger, null);
}

public virtual void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
public virtual void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
=> _logger.Log(logLevel, eventId, state, exception, formatter);

public virtual bool IsEnabled(LogLevel logLevel) => _logger.IsEnabled(logLevel);
Expand Down
10 changes: 5 additions & 5 deletions src/Servers/Kestrel/Transport.Quic/src/Internal/QuicTrace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ internal class QuicTrace : IQuicTrace
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(4, nameof(NewConnection)), @"Connection id ""{ConnectionId}"" accepted.");
private static readonly Action<ILogger, string, Exception?> _acceptedStream =
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(5, nameof(NewStream)), @"Stream id ""{ConnectionId}"" accepted.");
private static readonly Action<ILogger, string, string, Exception> _connectionError =
private static readonly Action<ILogger, string, string, Exception?> _connectionError =
LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId(6, nameof(ConnectionError)), @"Connection id ""{ConnectionId}"" hit an exception: ""{Reason}"".");
private static readonly Action<ILogger, string, string, Exception> _streamError =
private static readonly Action<ILogger, string, string, Exception?> _streamError =
LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId(7, nameof(StreamError)), @"Connection id ""{ConnectionId}"" hit an exception: ""{Reason}"".");
private static readonly Action<ILogger, string, Exception?> _streamPause =
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(7, nameof(StreamPause)), @"Stream id ""{ConnectionId}"" paused.");
private static readonly Action<ILogger, string, Exception?> _streamResume =
LoggerMessage.Define<string>(LogLevel.Debug, new EventId(7, nameof(StreamResume)), @"Stream id ""{ConnectionId}"" resumed.");
private static readonly Action<ILogger, string, string, Exception> _streamShutdownWrite =
private static readonly Action<ILogger, string, string, Exception?> _streamShutdownWrite =
LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId(7, nameof(StreamShutdownWrite)), @"Stream id ""{ConnectionId}"" shutting down writes, exception: ""{Reason}"".");
private static readonly Action<ILogger, string, string, Exception> _streamAborted =
private static readonly Action<ILogger, string, string, Exception?> _streamAborted =
LoggerMessage.Define<string, string>(LogLevel.Debug, new EventId(7, nameof(StreamShutdownWrite)), @"Stream id ""{ConnectionId}"" aborted by application, exception: ""{Reason}"".");

private ILogger _logger;
Expand All @@ -36,7 +36,7 @@ public QuicTrace(ILogger logger)

public bool IsEnabled(LogLevel logLevel) => _logger.IsEnabled(logLevel);

public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
=> _logger.Log(logLevel, eventId, state, exception, formatter);

public void NewConnection(string connectionId)
Expand Down
Loading

0 comments on commit 2ceca7f

Please sign in to comment.