dotnet / aspnetcore Public
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
[main] Update dependencies from dotnet/runtime #40063
[main] Update dependencies from dotnet/runtime #40063
Conversation
…0207.26 Microsoft.NETCore.Platforms , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.App.Runtime.win-x64 , System.Diagnostics.EventLog , System.Diagnostics.DiagnosticSource , System.DirectoryServices.Protocols , System.Security.Cryptography.Pkcs , System.Runtime.CompilerServices.Unsafe , System.Resources.Extensions , System.Reflection.Metadata , System.Net.Http.Json , System.IO.Pipelines , System.Net.Http.WinHttpHandler , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.Extensions.Primitives , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.Configuration.Xml , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.Ini , Microsoft.Extensions.Configuration.FileExtensions , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration , Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Caching.Abstractions , Microsoft.Extensions.DependencyInjection.Abstractions , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Abstractions , Microsoft.Extensions.Options.DataAnnotations , Microsoft.Extensions.Options.ConfigurationExtensions , Microsoft.Extensions.Options , Microsoft.Extensions.Logging.TraceSource , Microsoft.Extensions.Logging.EventSource , Microsoft.Extensions.Logging.EventLog , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Configuration , Microsoft.Extensions.Logging.Abstractions , Microsoft.Extensions.Http , Microsoft.Extensions.Hosting.Abstractions , Microsoft.Extensions.Hosting , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.FileSystemGlobbing , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.FileProviders.Composite , Microsoft.Extensions.Logging , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , System.Security.Cryptography.Xml , System.Threading.RateLimiting , System.Threading.Channels , System.Text.Json , System.Text.Encodings.Web , System.ServiceProcess.ServiceController From Version 7.0.0-preview.2.22103.2 -> To Version 7.0.0-preview.2.22107.26
@dougbu It looks something like a breaking change in the compiler or build toolchain means that lots (like, 50+) of our code files that were considered valid before are now considered invalid for nullability rules. Do you recommend any specific contact on dotnet/runtime we should approach for info about this? |
@jeffhandley why would
@SteveSandersonMS I only see complaints about 3 files in the following. Where are you seeing 50+ problematic files
|
Right, yes, sorry. I was looking at GitHub's "Files Changed" tab and saw a huge list. On closer inspection this includes duplicates for every target platform, so you're right that the underlying set of affected files is much smaller: So yes it does look like some possibly incorrect change in |
We just merged in [Group 2] Enable nullable annotations for I'll defer to @dotnet/area-extensions-caching for the accuracy of this specific annotation and if the annotation needs to be corrected or if these calls sites need to be. |
This is because MemoryCache isn't generic, like for example So if in your usages of the MemoryCache you know that you will never cache |
…0208.17 Microsoft.NETCore.Platforms , Microsoft.NETCore.BrowserDebugHost.Transport , Microsoft.NETCore.App.Runtime.win-x64 , System.Diagnostics.EventLog , System.Diagnostics.DiagnosticSource , System.DirectoryServices.Protocols , System.Security.Cryptography.Pkcs , System.Runtime.CompilerServices.Unsafe , System.Resources.Extensions , System.Reflection.Metadata , System.Net.Http.Json , System.IO.Pipelines , System.Net.Http.WinHttpHandler , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.Extensions.Primitives , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.Configuration.Xml , Microsoft.Extensions.Configuration.UserSecrets , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.Configuration.Ini , Microsoft.Extensions.Configuration.FileExtensions , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.CommandLine , Microsoft.Extensions.Configuration.Binder , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration , Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Caching.Abstractions , Microsoft.Extensions.DependencyInjection.Abstractions , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.FileProviders.Abstractions , Microsoft.Extensions.Options.DataAnnotations , Microsoft.Extensions.Options.ConfigurationExtensions , Microsoft.Extensions.Options , Microsoft.Extensions.Logging.TraceSource , Microsoft.Extensions.Logging.EventSource , Microsoft.Extensions.Logging.EventLog , Microsoft.Extensions.Logging.Debug , Microsoft.Extensions.Logging.Console , Microsoft.Extensions.Logging.Configuration , Microsoft.Extensions.Logging.Abstractions , Microsoft.Extensions.Http , Microsoft.Extensions.Hosting.Abstractions , Microsoft.Extensions.Hosting , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.FileSystemGlobbing , Microsoft.Extensions.FileProviders.Physical , Microsoft.Extensions.FileProviders.Composite , Microsoft.Extensions.Logging , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , System.Security.Cryptography.Xml , System.Threading.RateLimiting , System.Threading.Channels , System.Text.Json , System.Text.Encodings.Web , System.ServiceProcess.ServiceController From Version 7.0.0-preview.2.22103.2 -> To Version 7.0.0-preview.2.22108.17
I updated this PR, but the setters feel super weird: public static TItem? Set<TItem>(this IMemoryCache cache, object key, TItem? value)
public static TItem? Set<TItem>(this IMemoryCache cache, object key, TItem? value, MemoryCacheEntryOptions? options)
public static TItem? Set<TItem>(this IMemoryCache cache, object key, TItem? value, IChangeToken expirationToken)
public static TItem? Set<TItem>(this IMemoryCache cache, object key, TItem? value, DateTimeOffset absoluteExpiration)
public static TItem? Set<TItem>(this IMemoryCache cache, object key, TItem? value, TimeSpan absoluteExpirationRelativeToNow) Why not just let it accept a value of type string? cached = memoryCache.Set<string>("some-key", "some-value"); // Why did the memory cache set a null value? |
@@ -24,7 +24,7 @@ public static async Task RetrieveClaimsAsync(LdapSettings settings, ClaimsIdenti | |||
settings.ClaimsCache = new MemoryCache(new MemoryCacheOptions { SizeLimit = settings.ClaimsCacheSize }); | |||
} | |||
|
|||
if (settings.ClaimsCache.TryGetValue<IEnumerable<string>>(user, out var cachedClaims)) | |||
if (settings.ClaimsCache.TryGetValue<IEnumerable<string>>(user, out var cachedClaims) && cachedClaims is not null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @Tratcher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ick. Do we need TryGetNonNullableValue(...)
methods to make this look more reasonable when <T>
isn't nullable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggestion @eerhardt had was to use the forgiveness operator, but that just as iffy.
@pranavkm, since that extension method is generic, I think that one might have been a mistake. Do you think you could open an issue in dotnet/runtime for that? Looking deeper, there is also a generic extension method FYI - @maxkoshevoi |
Here you go: dotnet/runtime#65107 |
This pull request updates the following dependencies
From https://github.com/dotnet/runtime
The text was updated successfully, but these errors were encountered: