Skip to content

Commit 6265248

Browse files
authored
Merge branch 'master' into upstream/covariantReturnTypes
2 parents 967c2e6 + cc0cb81 commit 6265248

357 files changed

Lines changed: 15393 additions & 5389 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ChangeLog/6.0.11_Z_Final.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[main] Added an option to remove cached queries of removing storage node along with the node, default behavior remains the same
2+
[postgresql] Dedicated exception when the extracting schema doesn't exist or it belongs to another user
3+
[weaver] Fixed constructor processing with try...catch, catch section now has correct leave

ChangeLog/7.1.0-Beta-2-dev.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.

ChangeLog/7.1.0-Beta-2.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[main] NET6 support
2+
[main] Obsolete CatalogHelper class has been removed
3+
[main] Obsolete ReacreateTableHint has been removed
4+
[main] Obsolete Session.SelectStorageNode() method is removed
5+
[main] Obsolete methods from ArrayExtensions, EnumerableExtensions and QueryableExtensions have been removed
6+
[main] Obsolete DeleteDataHint.PostCopy property has been removed
7+
[main] Obsolete QueryEndpoint's members have been removed
8+
[main] Obsolete Query's members have been removed
9+
[main] Obsolete members of DelayedScalarQuery<T> have been removed
10+
[main] Obsolete FieldInfo.IsDynalicallyDefined property's been removed (FieldInfo.IsDynamicallyDefined is still there)
11+
[main] Changed translation of queries when DomainConfiguration.ShareStorageSchemaOverNodes set to true
12+
[main] StorageDriver.Compile(ISqlCompileUnit, NodeConfiguration) became obsolete
13+
[main] SqlNodeActualizer became obsolete
14+
[main] LockableExtensions.EnsureNotLocked() became obsolete, implementation moved to LockableBase directly
15+
[main] TypeInfoCollection.FindAncestor method became obsolete, use new TypeInfo.Ancestor property
16+
[main] TypeInfoCollection.FindDescendants methods became obsolete, use new TypeInfo.DirectDescendants/.AllDescendants properties
17+
[main] TypeInfoCollection.FindInterfaces methods became obsolete, use new TypeInfo.DirectInterfaces/.AllInterfaces properties
18+
[main] TypeInfoCollection.FindImplementors methods became obsolete, use new TypeInfo.DirectImplementors/.AllImplementors properties
19+
[main] TypeInfoCollection.FindRoot method became obsolete, use introduced TypeInfo.Root property
20+
[main] TypeInfo.GetImplementors(bool) became obsolete, use new TypeInfo.DirectImplementors/.AllImplementors properties
21+
[main] TypeInfo.GetInterfaces(bool) became obsolete, use new TypeInfo.DirectInterfaces/.AllInterfaces properties
22+
[main] TypeInfo.GetDescendants(bool) became obsolete, use new TypeInfo.DirectDescendants/.AllDescendants properties
23+
[main] TypeInfo.GetAncestors() became obsolete, use new TypeInfo.Ancestors property
24+
[main] TypeInfo.GetRoot() became obsolete, use introduced TypeInfo.Root property
25+
[main] IPropertyValidator.IsImmediate is read-only now
26+
[main] PropertyValidator.IsImmediate property has no setter, only init
27+
[main] PropertyValidator.ValidateOnlyIfModified property has no setter, only init
28+
[main] PropertyValidator.SkipOnTransactionCommit property has no setter, only init
29+
[main] RecordSetHeader.OrderTupleDescriptor became nullable to compensate TupleDescriptor's transition to read-only structure
30+
[main] IndexInfo.FilterByTypes changed result type to IReadOnlyList<TypeInfo>
31+
[main] IndexInfo.SelectColumns changed result type to IReadOnlyList<int>
32+
[main] IndexInfo.ValueColumnsMap changed result type to IReadOnlyList<Pair<int, List<int>>>
33+
[main] SqlCompilerConfiguration's DatabaseMapping and SchemaMapping moved to SqlPostCompilerConfiguration
34+
[main] Some EventArgs inheritors that were sealed classes transformed to read-only structures
35+
[main] DbCommandEventArgs became read-only structure
36+
[main] LogEventInfo became read-only structure
37+
[main] ILockable.Lock() now has default implementation that refers to ILockable.Lock(true)
38+
[main] TupleDescriptor became read-only structure
39+
[main] InterfaceMapping became read-only structure
40+
[main] ColumnIndexMap became read-only structure and properties changed retun type to IReadOnlyList<int>
41+
[main] TopologicalSorter.Sort() methods return IEnumerable<T>, use .SortToList() if results are needed as collection
42+
[main] TypeHelper.OrderByInheritance() returns IEnumerable<T> to avoid copying
43+
[main] TypeHelper.GetInterfaces() became obsolete, GetInterfacesUnordered() and GetInterfacesOrderedByInheritance() introduced
44+
[main] TypeDef.Validators and FieldDef.Validators properties return List<T>
45+
[main] SqlCustomFunctionCall and SqlFunctionCall share one base type
46+
[main] SqlFunctionCall.Arguments property is IReadOnlyList now and parameters can't be changed after instance creation
47+
[main] Xtensive.Sql.Dml.Extensions.IsNullReference() extension method is marked obsolete, use 'is null' operator instead
48+
[main] DirectSessionAccessor.GetChangedEntities() result type changed to improve enumeration
49+
[main] EntityChangeRegistry.GetItems(PersistenceState) changed result type to improve enumeration
50+
[main] EntitySetChangeRegistry.GetItems() changed result type to improve enumeration
51+
[main] IgnoreRule now has only one public constructor - parameterless
52+
[main] IgnoreRule supports indexes
53+
[main] Queries use parameters instead of constant values for type indentifiers within columns list
54+
[main] Added DomainConfiguration.PreferTypeIdsAsQueryParameters to choose between contants and parameters for TypeIds
55+
[main] ShareStorageSchemaOverNodes option now includes shared query cache when TypeIds as paremters are prefered
56+
[main] Introduced TypeInfo.Ancestor property
57+
[main] Introduced TypeInfo.DirectDescendants and.AllDescendants properties
58+
[main] Introduced TypeInfo.DirectInterfaces and.AllInterfaces properties
59+
[main] Introduced TypeInfo.DirectImplementors .AllImplementors properties
60+
[main] BitFaster.Caching package reference is updated to 1.0.7
61+
[main] No error caused by ambiguity due to new IQueryable extension methods of .Net 6
62+
[main] Improved internal logging speed
63+
[main] General performance and memory efficiency improvements
64+
[reprocessing] DomainBuildErrorEventArgs (not sealed) became read-only structure
65+
[reprocessing] ExecuteErrorEventArgs (not sealed) became read-only structure
66+
[tracking] TrackingCompletedEventArgs (sealed) became read-only structure
67+
[tracking] ITrackingItem ChangedValues property changed return type to IReadOnlyList<ChangedValue>
68+
[tracking] ChangedValue became read-only structure
69+
[Web] Removed Obsolete SessionManager and StartupConfigurationExtension

ChangeLog/7.1.0-RC.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[main] Add support for new .NET 6 DateOnly and TimeOnly types
2+
[main] Updated BitFaster.Caching package reference to v2.0.0
3+
[main] Fixed ColumnInfoCollection leakage on building indexes
4+
[sqlserver] Updated Microsoft.Data.SqlClient package references to v5.0.0 and v6.0.1

ChangeLog/7.1.0-RC2-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[main] Added support for DefaultExpression within Linq queries

Directory.Build.props

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,60 @@
3333
<DoGeneratePackage Condition="$(MSBuildProjectName) == 'TestCommon'">false</DoGeneratePackage>
3434
<DoGeneratePackage Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">false</DoGeneratePackage>
3535

36+
<!-- BuildingInsideVisualStudio is also true in Rider -->
37+
<DoIsIdeBuild>false</DoIsIdeBuild>
38+
<DoIsIdeBuild Condition="$(BuildingInsideVisualStudio) == 'true'">true</DoIsIdeBuild>
39+
3640
<!-- Disable "BinaryFormatter is obsolete" warnings for test projects -->
3741
<NoWarn Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">$(NoWarn);SYSLIB0011</NoWarn>
3842
</PropertyGroup>
3943

44+
<!-- Debug-NET6, Release-NET6 are mostly for development convenience -->
45+
<PropertyGroup Condition = "$(Configuration.Contains('NET6')) == 'true'">
46+
<!-- hard binding to net6, no property and env variable allowed -->
47+
<TargetFrameworks>net6.0</TargetFrameworks>
48+
</PropertyGroup>
49+
50+
<!-- Debug-NET5, Release-NET5 are mostly for development convenience -->
51+
<PropertyGroup Condition = "$(Configuration.Contains('NET5')) == 'true'">
52+
<!-- hard binding to net5, no property and env variable allowed-->
53+
<TargetFrameworks>net5.0</TargetFrameworks>
54+
</PropertyGroup>
55+
56+
<!--Release and Debug are for final builds, builds on build server, etc. Target frameworks are configurable here -->
57+
<PropertyGroup Label="Defaults" Condition="$(Configuration.Contains('NET5')) == 'false' AND $(Configuration.Contains('NET6')) == 'false'">
58+
<Configuration Condition="$(Configuration) == ''">Debug</Configuration>
59+
<TargetFrameworks>$(TargetFrameworks)</TargetFrameworks> <!-- the property -->
60+
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">$(DO_TargetFrameworks)</TargetFrameworks> <!-- env var -->
61+
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">net6.0;net5.0</TargetFrameworks> <!-- fallback to default -->
62+
</PropertyGroup>
63+
64+
<PropertyGroup Condition = "$(Configuration.Contains('Debug')) == 'true'">
65+
<DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>
66+
<DebugSymbols>true</DebugSymbols>
67+
<DebugType>portable</DebugType>
68+
</PropertyGroup>
69+
70+
<PropertyGroup Condition = "$(Configuration.Contains('Release')) == 'true'">
71+
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
72+
</PropertyGroup>
73+
4074
<PropertyGroup>
4175
<NoLogo>true</NoLogo>
4276
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
43-
<TargetFrameworks>$(TargetFrameworks)</TargetFrameworks> <!-- the property -->
44-
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">$(DO_TargetFrameworks)</TargetFrameworks> <!-- env var -->
45-
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">net5.0</TargetFrameworks> <!-- fallback to default -->
4677
<LangVersion>9.0</LangVersion>
4778
<SolutionDir Condition="$(SolutionDir) == ''">$([MSBuild]::EnsureTrailingSlash(
4879
$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildThisFileDirectory)', 'Orm.sln'))))</SolutionDir>
49-
<Configuration Condition="$(Configuration) == ''">Debug</Configuration>
5080
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
5181
<ArtifactsDir Condition="'$(ArtifactsDir)'==''">$(SolutionDir)_Build\</ArtifactsDir>
5282
<BaseIntermediateOutputPath>$(ArtifactsDir)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
53-
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\$(TargetFramework)\</IntermediateOutputPath>
83+
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
5484
<BaseOutputPath>$(ArtifactsDir)bin\$(Configuration)\</BaseOutputPath>
5585
<BaseOutputPath Condition="$(MSBuildProjectName.Contains('Tests'))
5686
OR $(MSBuildProjectName) == 'TestCommon'
5787
OR $(MSBuildProjectName) == 'Xtensive.Orm.Manual'">$(ArtifactsDir)tests\$(Configuration)\</BaseOutputPath>
5888
<OutputPath>$(BaseOutputPath)lib\</OutputPath>
59-
<MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>
89+
<MSBuildProjectExtensionsPath>$(IntermediateOutputPath)</MSBuildProjectExtensionsPath>
6090
<ProjectAssetsFile>$(MSBuildProjectExtensionsPath)project.assets.json</ProjectAssetsFile>
6191
<ProjectAssetsCacheFile>$(MSBuildProjectExtensionsPath)$(TargetFramework)\$(MSBuildProjectName).assets.cache</ProjectAssetsCacheFile>
6292
<OrmKeyFile>$(SolutionDir)Orm\Orm.snk</OrmKeyFile>

Directory.Build.targets

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<!--
5+
Restores packages if needed. This helps VS to not go crazy on build configuration change
6+
-->
7+
<Target Name="DORestorePackages" BeforeTargets="PrepareForBuild"
8+
Condition="!Exists($(ProjectAssetsFile)) AND $(DoIsIdeBuild)=='true'">
9+
<CallTarget Targets="Restore" />
10+
</Target>
11+
</Project>

Extensions/TestCommon/TestCommon.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<DocumentationFile />
4+
<Configurations>Debug;Release;Debug-NET5;Release-NET5;Debug-NET6;Release-NET6;</Configurations>
45
</PropertyGroup>
56
<PropertyGroup>
67
<SignAssembly>true</SignAssembly>
78
<AssemblyOriginatorKeyFile>$(ExtensionsKeyFile)</AssemblyOriginatorKeyFile>
89
</PropertyGroup>
910
<Import Project="$(SolutionDir)MSBuild\DataObjects.Net.InternalBuild.targets" />
11+
<ItemGroup Condition="'$(TargetFramework)'=='net5.0'">
12+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
13+
</ItemGroup>
14+
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
15+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
16+
</ItemGroup>
1017
<ItemGroup>
1118
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1219
<PackageReference Include="NUnit" Version="3.13.2" />
1320
<PackageReference Include="NUnit3TestAdapter" Version="4.2.0" />
14-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
1521
</ItemGroup>
1622
<ItemGroup>
1723
<ProjectReference Include="..\..\Orm\Xtensive.Orm.Tests.Framework\Xtensive.Orm.Tests.Framework.csproj" />

Extensions/Xtensive.Orm.BulkOperations.Tests/Xtensive.Orm.BulkOperations.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<DocumentationFile />
4+
<Configurations>Debug;Release;Debug-NET5;Release-NET5;Debug-NET6;Release-NET6;</Configurations>
45
</PropertyGroup>
56
<Import Project="$(SolutionDir)MSBuild\DataObjects.Net.InternalBuild.targets" />
67
<ItemGroup>

Extensions/Xtensive.Orm.BulkOperations/Internals/ExpressionVisitor.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// Copyright (C) 2019-2020 Xtensive LLC.
1+
// Copyright (C) 2019-2023 Xtensive LLC.
22
// This code is distributed under MIT license terms.
33
// See the License.txt file in the project root for more information.
44

55
using System;
66
using System.Collections.Generic;
77
using System.Collections.ObjectModel;
88
using System.Linq.Expressions;
9+
using Xtensive.Core;
910
using Xtensive.Linq;
1011

1112
namespace Xtensive.Orm.BulkOperations
@@ -95,6 +96,8 @@ protected virtual Expression Visit(Expression exp)
9596
return VisitConditional((ConditionalExpression) exp);
9697
case ExpressionType.Constant:
9798
return VisitConstant((ConstantExpression) exp);
99+
case ExpressionType.Default:
100+
return VisitDefault((DefaultExpression) exp);
98101
case ExpressionType.Parameter:
99102
return VisitParameter((ParameterExpression) exp);
100103
case ExpressionType.MemberAccess:
@@ -180,6 +183,11 @@ private Expression VisitConstant(ConstantExpression c)
180183
return c;
181184
}
182185

186+
private Expression VisitDefault(DefaultExpression d)
187+
{
188+
return d.ToConstantExpression();
189+
}
190+
183191
private ElementInit VisitElementInitializer(ElementInit initializer)
184192
{
185193
IEnumerable<Expression> arguments = VisitExpressionList(initializer.Arguments);

0 commit comments

Comments
 (0)