Repository navigation
Update to .NET 11 #896
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
Open
Saancreed
wants to merge
11
commits into
v11.0-preview
Choose a base branch
from
net11
base: v11.0-preview
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update to .NET 11 #896
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7572cf5
Upgrade to .NET 11 and related packages, update README
Saancreed 4555292
Bump more packages and adjust code as needed
Saancreed 9fa84db
Group some package versions when they share release history
Saancreed d641618
Leave a TODO for my future self
Saancreed 83a73da
Replace IdentityModel with Duende.IdentityModel
Saancreed 04cb75e
Update integration tests to .NET 11 and Npgsql.EFCore to rc.1
Saancreed 56fc2fa
Update Extensions version to satisfy EFCore requirements, add package…
Saancreed 5553f3d
Skip Postgres-only integration tests more automagically
Saancreed 102a916
Work around Npgsql 11 retaining the CLR type in DateTimeOffset.UtcDat…
Saancreed e32b338
Isolate the artifacts from integration tests executed in Docker
Saancreed f89807d
Address some non-codestyle diagnostics reported by analyzers
Saancreed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <configuration> | ||
| <packageSources> | ||
| <clear /> | ||
| <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||
| <add key="dotnet11" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet11/nuget/v3/index.json" /> | ||
| </packageSources> | ||
| <!-- Source mapping matches IDs, not versions. These IDs are used in stable versions from | ||
| nuget.org and in daily .NET 11 versions, so they must be mapped to both sources. --> | ||
| <packageSourceMapping> | ||
| <packageSource key="nuget.org"> | ||
| <package pattern="*" /> | ||
| <package pattern="Microsoft.EntityFrameworkCore*" /> | ||
| <package pattern="Microsoft.Data.Sqlite.Core" /> | ||
| <package pattern="Microsoft.Extensions.Caching.Memory" /> | ||
| <package pattern="Microsoft.Extensions.Configuration" /> | ||
| <package pattern="Microsoft.Extensions.Configuration.Binder" /> | ||
| <package pattern="Microsoft.Extensions.DependencyInjection" /> | ||
| <package pattern="Microsoft.Extensions.DependencyInjection.Abstractions" /> | ||
| <package pattern="Microsoft.Extensions.DependencyModel" /> | ||
| <package pattern="Microsoft.Extensions.Diagnostics" /> | ||
| <package pattern="Microsoft.Extensions.Hosting.Abstractions" /> | ||
| <package pattern="Microsoft.Extensions.Http" /> | ||
| <package pattern="Microsoft.Extensions.Logging" /> | ||
| <package pattern="Microsoft.Extensions.Logging.Configuration" /> | ||
| <package pattern="Microsoft.Extensions.Logging.Console" /> | ||
| <package pattern="Microsoft.Extensions.Options.ConfigurationExtensions" /> | ||
| </packageSource> | ||
| <packageSource key="dotnet11"> | ||
| <package pattern="Microsoft.EntityFrameworkCore*" /> | ||
| <package pattern="Microsoft.Data.Sqlite.Core" /> | ||
| <package pattern="Microsoft.Extensions.Caching.Memory" /> | ||
| <package pattern="Microsoft.Extensions.Configuration" /> | ||
| <package pattern="Microsoft.Extensions.Configuration.Binder" /> | ||
| <package pattern="Microsoft.Extensions.DependencyInjection" /> | ||
| <package pattern="Microsoft.Extensions.DependencyInjection.Abstractions" /> | ||
| <package pattern="Microsoft.Extensions.DependencyModel" /> | ||
| <package pattern="Microsoft.Extensions.Diagnostics" /> | ||
| <package pattern="Microsoft.Extensions.Hosting.Abstractions" /> | ||
| <package pattern="Microsoft.Extensions.Http" /> | ||
| <package pattern="Microsoft.Extensions.Logging" /> | ||
| <package pattern="Microsoft.Extensions.Logging.Configuration" /> | ||
| <package pattern="Microsoft.Extensions.Logging.Console" /> | ||
| <package pattern="Microsoft.Extensions.Options.ConfigurationExtensions" /> | ||
| </packageSource> | ||
| </packageSourceMapping> | ||
| </configuration> |
2 changes: 1 addition & 1 deletion
2
src/CQRS/LeanCode.CQRS.Annotations/LeanCode.CQRS.Annotations.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ public sealed class TimestampTzExpressionRewriter : ExpressionVisitor | |
| { | ||
| private static readonly Type TimestampTzType = typeof(TimestampTz); | ||
| private static readonly Type TimeZoneInfoType = typeof(TimeZoneInfo); | ||
| private static readonly Type DateTimeType = typeof(DateTime); | ||
| private static readonly Type DateTimeOffsetType = typeof(DateTimeOffset); | ||
|
|
||
| public static readonly PropertyInfo LocalTimestampWithoutOffsetProperty = | ||
|
|
@@ -27,6 +28,10 @@ public sealed class TimestampTzExpressionRewriter : ExpressionVisitor | |
| DateTimeOffsetType.GetProperty(nameof(DateTimeOffset.UtcDateTime)) | ||
| ?? throw new MissingMemberException(DateTimeOffsetType.FullName, nameof(DateTimeOffset.UtcDateTime)); | ||
|
|
||
| public static readonly MethodInfo ToUniversalTimeMethod = | ||
| DateTimeType.GetMethod(nameof(DateTime.ToUniversalTime), Type.EmptyTypes) | ||
| ?? throw new MissingMemberException(DateTimeType.FullName, nameof(DateTime.ToUniversalTime)); | ||
|
|
||
| public static readonly MethodInfo ConvertDateTimeBySystemTimeZoneIdMethod = | ||
| TimeZoneInfoType.GetMethod( | ||
| nameof(TimeZoneInfo.ConvertTimeBySystemTimeZoneId), | ||
|
|
@@ -44,7 +49,15 @@ protected override Expression VisitMember(MemberExpression node) | |
| return Expression.Call( | ||
| null, | ||
| ConvertDateTimeBySystemTimeZoneIdMethod, | ||
| Expression.Property(Expression.Property(node.Expression, UtcTimestampProperty), UtcDateTimeProperty), | ||
| // Npgsql 11 translates UtcDateTime as a no-op which retains DateTimeOffset as the SQL | ||
| // expression's CLR type. ToUniversalTime retags it as DateTime, which the outer translator requires. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can also link your issue here (shows blocker explicitly): npgsql/efcore.pg#3912. 😄
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC I committed that before I made this issue 🙃 |
||
| Expression.Call( | ||
| Expression.Property( | ||
| Expression.Property(node.Expression, UtcTimestampProperty), | ||
| UtcDateTimeProperty | ||
| ), | ||
| ToUniversalTimeMethod | ||
| ), | ||
| Expression.Property(node.Expression, TimeZoneIdProperty) | ||
| ); | ||
| } | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
No bump for this one?
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.
This is already the newest version: https://www.nuget.org/packages/Microsoft.Extensions.Telemetry.Testing
I'm not sure what we need this for, but the package appears to be kind of abandoned. Didn't want to touch this during the bump though.