Skip to content

Commit 0e40fdb

Browse files
authored
Merge branch 'master' into CollectionFilter_On_JoinedSubclass
2 parents 8c3c86c + 08521dc commit 0e40fdb

File tree

363 files changed

+10719
-3471
lines changed

Some content is hidden

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

363 files changed

+10719
-3471
lines changed

.config/dotnet-tools.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"csharpasyncgenerator.tool": {
6+
"version": "0.20.1",
7+
"commands": [
8+
"async-generator"
9+
]
10+
}
11+
}
12+
}

.deepsource.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version = 1
2+
3+
test_patterns = ["src/NHibernate.Test/**"]
4+
5+
[[analyzers]]
6+
name = "csharp"
7+
enabled = true

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: nuget
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
rebase-strategy: "disabled"
8+
open-pull-requests-limit: 10
9+
ignore:
10+
- dependency-name: Microsoft.AspNetCore
11+
versions:
12+
- "> 2.0.0"
13+
- dependency-name: Microsoft.AspNetCore.Mvc
14+
versions:
15+
- "> 2.0.0"
16+
- dependency-name: Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
17+
versions:
18+
- "> 2.0.0"
19+
- dependency-name: Microsoft.AspNetCore.StaticFiles
20+
versions:
21+
- "> 2.0.0"

.github/workflows/NetCoreTests.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ jobs:
1616
CONNECTION_STRING: "DataSource=localhost;Database=nhibernate;User=SYSDBA;Password=nhibernate;charset=utf8;"
1717
- DB: MySQL
1818
CONNECTION_STRING: "Server=localhost;Uid=root;Password=nhibernate;Database=nhibernate;Old Guids=True;"
19-
ALLOW_FAILURE: true
19+
- DB: Oracle
20+
CONNECTION_STRING: "User ID=nhibernate;Password=nhibernate;Metadata Pooling=false;Self Tuning=false;Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XEPDB1)))"
2021
- DB: SQLite
2122
runs-on: ubuntu-latest
2223
continue-on-error: ${{matrix.ALLOW_FAILURE == true}}
@@ -34,7 +35,7 @@ jobs:
3435
if: matrix.DB == 'MySQL'
3536
run: |
3637
sudo service mysql stop
37-
docker run --name mysql -e MYSQL_ROOT_PASSWORD=nhibernate -e MYSQL_USER=nhibernate -e MYSQL_PASSWORD=nhibernate -e MYSQL_DATABASE=nhibernate -p 3306:3306 --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 -d mysql:5.7 mysqld --lower_case_table_names=1
38+
docker run --name mysql -e MYSQL_ROOT_PASSWORD=nhibernate -e MYSQL_USER=nhibernate -e MYSQL_PASSWORD=nhibernate -e MYSQL_DATABASE=nhibernate -p 3306:3306 --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 -d mysql:5.7 mysqld --lower_case_table_names=1 --character-set-server=utf8 --collation-server=utf8_general_ci
3839
3940
- name: Set up PostgreSQL
4041
if: matrix.DB == 'PostgreSQL'
@@ -46,11 +47,16 @@ jobs:
4647
run: |
4748
docker run --name firebird -e EnableWireCrypt=true -e FIREBIRD_USER=nhibernate -e FIREBIRD_PASSWORD=nhibernate -e ISC_PASSWORD=nhibernate -e FIREBIRD_DATABASE=nhibernate -p 3050:3050 -d jacobalberty/firebird:v3.0
4849
50+
- name: Set up Oracle
51+
if: matrix.DB == 'Oracle'
52+
run: |
53+
docker run -d -p 1521:1521 -e APP_USER=nhibernate -e APP_USER_PASSWORD=nhibernate -e ORACLE_PASSWORD=nhibernate gvenzl/oracle-xe:18-slim
54+
4955
- uses: actions/checkout@v2
5056
- name: Setup .NET
51-
uses: actions/setup-dotnet@v1.8.0
57+
uses: actions/setup-dotnet@v1
5258
with:
53-
dotnet-version: 2.1.x
59+
dotnet-version: 6.0.x
5460

5561
- name: Build and Test
5662
run: |

NHibernate.nunit

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<NUnitProject>
22
<Settings activeconfig="Debug" processModel="Multiple" />
33
<Config name="Debug" binpathtype="Auto" runtimeFramework="net-4.0">
4-
<assembly path="src\NHibernate.TestDatabaseSetup\bin\Debug\net461\NHibernate.TestDatabaseSetup.dll" />
5-
<assembly path="src\NHibernate.Test\bin\Debug\net461\NHibernate.Test.dll" />
6-
<assembly path="src\NHibernate.Test.VisualBasic\bin\Debug\net461\NHibernate.Test.VisualBasic.dll" />
4+
<assembly path="src\NHibernate.TestDatabaseSetup\bin\Debug\net48\NHibernate.TestDatabaseSetup.dll" />
5+
<assembly path="src\NHibernate.Test\bin\Debug\net48\NHibernate.Test.dll" />
6+
<assembly path="src\NHibernate.Test.VisualBasic\bin\Debug\net48\NHibernate.Test.VisualBasic.dll" />
77
</Config>
88
<Config name="Release" binpathtype="Auto" runtimeFramework="net-4.0">
9-
<assembly path="src\NHibernate.TestDatabaseSetup\bin\Release\net461\NHibernate.TestDatabaseSetup.dll" />
10-
<assembly path="src\NHibernate.Test\bin\Release\net461\NHibernate.Test.dll" />
11-
<assembly path="src\NHibernate.Test.VisualBasic\bin\Release\net461\NHibernate.Test.VisualBasic.dll" />
9+
<assembly path="src\NHibernate.TestDatabaseSetup\bin\Release\net48\NHibernate.TestDatabaseSetup.dll" />
10+
<assembly path="src\NHibernate.Test\bin\Release\net48\NHibernate.Test.dll" />
11+
<assembly path="src\NHibernate.Test.VisualBasic\bin\Release\net48\NHibernate.Test.VisualBasic.dll" />
1212
</Config>
1313
</NUnitProject>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ of NHibernate (in no particular order):
103103
[Apache Software Foundation]: http://www.apache.org
104104
[JetBrains]: http://www.jetbrains.com
105105
[ReSharper]: http://www.jetbrains.com/resharper
106-
[LinFu]: http://code.google.com/p/linfu
106+
[LinFu]: https://github.com/philiplaureano/LinFu
107107
[article]: http://www.codeproject.com/KB/recipes/sets.aspx
108-
[Relinq]: http://relinq.codeplex.com/
108+
[Relinq]: https://github.com/re-motion/Relinq
109109
[AsyncGenerator]: http://github.com/maca88/AsyncGenerator

ShowBuildMenu.sh

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -172,42 +172,21 @@ testSetupMenu() {
172172
}
173173

174174
testRun(){
175-
dotnet test ./src/NHibernate.Test/NHibernate.Test.csproj -f netcoreapp2.0
176-
dotnet test ./src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.vbproj -f netcoreapp2.0
175+
dotnet test ./src/NHibernate.Test/NHibernate.Test.csproj -f net6.0
176+
dotnet test ./src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.vbproj -f net6.0
177177
mainMenu
178178
}
179179

180180
generateAsync(){
181-
dotnet restore ./src/NHibernate.sln
182-
183-
getAsyncGeneratorPath
184181
cd src
185-
dotnet ../"$async_generator_path"
182+
dotnet tool restore
183+
dotnet restore ./NHibernate.sln
184+
dotnet async-generator
186185
cd ..
187186

188187
mainMenu
189188
}
190189

191-
getAsyncGeneratorPath(){
192-
if [ "$async_generator_path" ]
193-
then
194-
return
195-
fi
196-
197-
cd Tools
198-
199-
async_generator_version="$(cat packages.csproj | grep Include=\"CSharpAsyncGenerator.CommandLine | cut -d\" -f4)"
200-
async_generator_path="csharpasyncgenerator.commandline/$async_generator_version/tools"
201-
202-
if [ ! -d $async_generator_path ]
203-
then
204-
dotnet restore "./packages.csproj" --packages .
205-
fi
206-
207-
async_generator_path="Tools/$async_generator_path/netcoreapp2.1/AsyncGenerator.CommandLine.dll"
208-
cd ..
209-
}
210-
211190
mainMenu() {
212191
echo "========================= NHIBERNATE BUILD MENU =========================="
213192
echo "--- TESTING ---"

Tools/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ csharpasyncgenerator.commandline/
44
gitreleasemanager/
55
obj/
66
microsoft.*
7+
netstandard.*

Tools/BuildTool/BuildTool.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
</PropertyGroup>
66
</Project>

Tools/packages.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="CSharpAsyncGenerator.CommandLine" Version="0.18.4" />
1514
<PackageReference Include="vswhere" Version="2.1.4" />
1615
<PackageReference Include="NUnit.Console" Version="3.10.0" />
1716
<PackageReference Include="GitReleaseManager" Version="0.11.0" />

appveyor.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: '{build}'
2-
image: Visual Studio 2017
2+
image: Visual Studio 2022
33
environment:
44
matrix:
55
- DB: SqlServer2008
@@ -8,14 +8,11 @@ environment:
88
CONNECTION_STRING: Host=localhost;Port=5432;Username=postgres;Password=Password12!;Database=nhibernate;Enlist=true;
99
- DB: Firebird
1010
- DB: MySQL
11-
CONNECTION_STRING: Server=127.0.0.1;Uid=root;Pwd=Password12!;Database=nhibernate;Old Guids=True;
11+
CONNECTION_STRING: Server=127.0.0.1;Uid=root;Pwd=Password12!;Database=nhibernate;Old Guids=True;SslMode=none;CharSet=utf8;
1212
- DB: SQLite
1313
init:
1414
# Required for having windows endlines in sources zip
1515
- git config --global core.autocrlf true
16-
matrix:
17-
allow_failures:
18-
- DB: MySQL
1916
build: off
2017
before_test:
2118
- ps: |-
@@ -45,7 +42,7 @@ before_test:
4542
Start-Service 'MySQL57'
4643
# Create nhibernate database (not handled by NHibernate.TestDatabaseSetup.dll)
4744
$env:MYSQL_PWD = 'Password12!'
48-
& 'C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql' -e 'CREATE DATABASE nhibernate;' --user=root
45+
& 'C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql' -e 'CREATE DATABASE nhibernate CHARACTER SET utf8 COLLATE utf8_general_ci;' --user=root
4946
}
5047
'Odbc' { Start-Service 'MSSQL$SQL2017' }
5148
'PostgreSQL' {

build-common/NHibernate.props

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<Import Condition="Exists('NHibernate.dev.props')" Project="NHibernate.dev.props"/>
33

44
<PropertyGroup>
5-
<NhVersion Condition="'$(NhVersion)' == ''" >5.3</NhVersion>
6-
<VersionPatch Condition="'$(VersionPatch)' == ''">13</VersionPatch>
5+
<NhVersion Condition="'$(NhVersion)' == ''" >5.4</NhVersion>
6+
<VersionPatch Condition="'$(VersionPatch)' == ''">0</VersionPatch>
77
<!-- Clear VersionSuffix for making release and set it to dev for making development builds -->
88
<VersionSuffix Condition="'$(VersionSuffix)' == ''">dev</VersionSuffix>
99

@@ -13,21 +13,26 @@
1313
<FileVersion Condition="'$(VersionSuffix)' != '' AND '$(BuildNumber)' != ''">$(VersionPrefix).$(BuildNumber)</FileVersion>
1414
<FileVersion Condition="'$(FileVersion)' == ''">$(VersionPrefix).0</FileVersion>
1515

16-
<NhAppTargetFrameworks Condition ="$(NhAppTargetFrameworks) == ''">net461;netcoreapp2.0;netcoreapp2.1</NhAppTargetFrameworks>
16+
<NhAppTargetFrameworks Condition ="$(NhAppTargetFrameworks) == ''">net48;net6.0</NhAppTargetFrameworks>
1717
<NhLibTargetFrameworks Condition ="$(NhLibTargetFrameworks) == ''">net461;netcoreapp2.0;netstandard2.0</NhLibTargetFrameworks>
1818
<NhNetFx>false</NhNetFx>
1919
<NhNetFx Condition="$(TargetFramework.StartsWith('net4'))">true</NhNetFx>
20-
<DefineConstants Condition="$(NhNetFx) AND $(NhVbNet) == ''" >NETFX;$(DefineConstants)</DefineConstants>
21-
<NhNetCoreApp>false</NhNetCoreApp>
22-
<NhNetCoreApp Condition="$(TargetFramework.StartsWith('netcoreapp'))">true</NhNetCoreApp>
23-
<DefineConstants Condition="$(NhNetCoreApp) AND $(NhVbNet) == ''" >NETCOREAPP2_0_OR_GREATER;$(DefineConstants)</DefineConstants>
20+
<!-- Visual Basic requires to use coma (,) as a separator, other project types - semicolon (;) -->
21+
<DefineConstants Condition="$(NhNetFx) AND '$(MSBuildProjectExtension)' != '.vbproj'">NETFX;$(DefineConstants)</DefineConstants>
22+
<DefineConstants Condition="$(NhNetFx) AND '$(MSBuildProjectExtension)' == '.vbproj'">NETFX,$(DefineConstants)</DefineConstants>
2423

2524
<Product>NHibernate</Product>
2625
<Company>NHibernate.info</Company>
2726
<Copyright>Licensed under LGPL.</Copyright>
2827
<Authors>NHibernate community, Hibernate community</Authors>
2928
<NeutralLanguage>en-US</NeutralLanguage>
3029

30+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
31+
<TreatSpecificWarningsAsErrors />
32+
33+
<DisableImplicitPackageTargetFallback>True</DisableImplicitPackageTargetFallback>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(IsPackable)' == 'True'">
3136
<PackageProjectUrl>https://nhibernate.info</PackageProjectUrl>
3237
<PackageIconUrl>https://raw.githubusercontent.com/nhibernate/nhibernate-core/master/logo/NHibernate-NuGet.png</PackageIconUrl>
3338
<PackageIcon>NHibernate-NuGet.png</PackageIcon>
@@ -38,13 +43,8 @@
3843
<PublishRepositoryUrl>true</PublishRepositoryUrl>
3944
<IncludeSymbols>true</IncludeSymbols>
4045
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
41-
42-
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
43-
<TreatSpecificWarningsAsErrors />
44-
45-
<DisableImplicitPackageTargetFallback>True</DisableImplicitPackageTargetFallback>
4646
</PropertyGroup>
4747
<ItemGroup>
48-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="all" />
48+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
4949
</ItemGroup>
5050
</Project>

build-common/common.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
</target>
4949

5050
<target name="common.tools-restore" depends="common.init">
51+
<exec workingdir="${root.dir}" program="dotnet" verbose="true">
52+
<arg line="tool restore" />
53+
</exec>
5154
<exec workingdir="${root.dir}/Tools" program="dotnet" verbose="true">
5255
<arg line="restore ./packages.csproj --packages ." />
5356
</exec>

default.build

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
>
77

88
<property name="root.dir" value="." />
9-
<property name="target.dir" value="net461" />
9+
<property name="bin.target.dir" value="net461" />
10+
<property name="test.target.dir" value="net48" />
1011

1112
<include buildfile="${root.dir}/build-common/common.xml" />
1213

@@ -64,15 +65,9 @@
6465
<property name="tool.path" value="${tools.dir}/${tool.id}/${tool.version}/" />
6566
</target>
6667

67-
<target name="find-async-generator-console">
68-
<property name="tool.id" value="CSharpAsyncGenerator.CommandLine" />
69-
<call target="get-tool-info" />
70-
<property name="async-generator-console" value="${tool.path}tools/netcoreapp2.1/AsyncGenerator.CommandLine.dll" />
71-
</target>
72-
73-
<target name="generate-async" depends="solution-restore find-async-generator-console">
68+
<target name="generate-async" depends="solution-restore">
7469
<exec workingdir="${root.dir}/src" program="dotnet" verbose="true">
75-
<arg line=".${async-generator-console}" />
70+
<arg line="async-generator" />
7671
</exec>
7772
</target>
7873

@@ -147,7 +142,7 @@
147142
</target>
148143

149144
<target name="put-connection-settings-into-app-config">
150-
<property name="app.config" value="src/${test.file}/bin/${build.config}/${target.dir}/${test.file}.dll.config" />
145+
<property name="app.config" value="src/${test.file}/bin/${build.config}/${test.target.dir}/${test.file}.dll.config" />
151146
<call target="put-connection-settings-into-defined-app-config" />
152147
</target>
153148

@@ -159,15 +154,15 @@
159154

160155
<target name="run-tests" depends="find-nunit" description="Run NUnit tests">
161156
<exec program="${nunit-console}" failonerror="${not property::exists(test.file + '.IgnoreFail')}">
162-
<arg value="${root.dir}/src/${test.file}/bin/${build.config}/${target.dir}/${test.file}.dll" />
157+
<arg value="${root.dir}/src/${test.file}/bin/${build.config}/${test.target.dir}/${test.file}.dll" />
163158
<arg value="--result=${testresults.dir}/${test.file}.dll-results.xml;format=nunit2" />
164159
<arg value="--teamcity" if="${property::exists('config.teamcity')}" />
165160
<arg value="--x86" unless="${property::exists('nunit-x64')}" />
166161
</exec>
167162
</target>
168163

169164
<target name="remove-connection-settings-from-app-config">
170-
<property name="app.config" value="${root.dir}/src/${test.file}/bin/${build.config}/${target.dir}/${test.file}.dll.config" />
165+
<property name="app.config" value="${root.dir}/src/${test.file}/bin/${build.config}/${test.target.dir}/${test.file}.dll.config" />
171166

172167
<xmlpoke
173168
file="${app.config}"
@@ -249,7 +244,7 @@
249244
</fileset>
250245
</copy>
251246
<copy todir="${bin-pack.required}">
252-
<fileset basedir="${root.dir}/src/NHibernate/bin/${build.config}/${target.dir}/">
247+
<fileset basedir="${root.dir}/src/NHibernate/bin/${build.config}/${bin.target.dir}/">
253248
<include name="Antlr3.Runtime.???" />
254249
<include name="Iesi.Collections.???" />
255250
<include name="NHibernate.???" />
@@ -266,20 +261,20 @@
266261
</fileset>
267262
</copy>
268263
<copy todir="${bin-pack.tests}">
269-
<fileset basedir="${root.dir}/src/NHibernate.Test/bin/${build.config}/${target.dir}">
264+
<fileset basedir="${root.dir}/src/NHibernate.Test/bin/${build.config}/${test.target.dir}">
270265
<include name="log4net*" />
271266
<include name="NHibernate.DomainModel.*" />
272267
<include name="NHibernate.Test.*" />
273268
<include name="nunit*" />
274269
</fileset>
275270
</copy>
276271
<copy todir="${bin-pack.tests}">
277-
<fileset basedir="${root.dir}/src/NHibernate.Test.VisualBasic/bin/${build.config}/${target.dir}">
272+
<fileset basedir="${root.dir}/src/NHibernate.Test.VisualBasic/bin/${build.config}/${test.target.dir}">
278273
<include name="NHibernate.Test.VisualBasic.*" />
279274
</fileset>
280275
</copy>
281276
<copy todir="${bin-pack.tests}">
282-
<fileset basedir="${root.dir}/src/NHibernate.TestDatabaseSetup/bin/${build.config}/${target.dir}">
277+
<fileset basedir="${root.dir}/src/NHibernate.TestDatabaseSetup/bin/${build.config}/${test.target.dir}">
283278
<include name="NHibernate.TestDatabaseSetup.*" />
284279
</fileset>
285280
</copy>

0 commit comments

Comments
 (0)