Skip to content

Commit e00f702

Browse files
Merge branch 'master' into CacheBuild
2 parents 511ef9e + 2345bb4 commit e00f702

File tree

640 files changed

+16900
-5924
lines changed

Some content is hidden

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

640 files changed

+16900
-5924
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ current-test-configuration
1313
NHibernate.dll
1414
TestResult.xml
1515
.vscode
16+
.DS_Store

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
language: csharp
2-
mono: none
3-
dotnet: 2.1.2
2+
mono: latest
3+
dotnet: 2.1.300
44
sudo: required
55
services:
66
- mysql
77
- postgresql
88
- docker
99
env:
10-
- DB=SqlServer2008 CONNECTION_STRING="Server=localhost;initial catalog=nhibernate;User Id=sa;Password=P@ssw0rd;"
10+
- DB=SqlServer2008 CONNECTION_STRING="Server=localhost;initial catalog=nhibernate;User Id=sa;Password=P@ssw0rd;packet size=4096;"
1111
- DB=PostgreSQL CONNECTION_STRING="Host=localhost;Port=5432;Username=postgres;Database=nhibernate;Enlist=true;"
1212
- DB=Firebird
1313
- DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;"

CONTRIBUTING.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Visit [https://github.com/nhibernate/nhibernate-core/issues][1] and search for y
1212

1313
Before creating an issue, please do your best to verify the existence of the problem. This reduces noise in the issue tracker and helps conserve the resources of the team for more useful tasks. Note the issue number for future steps.
1414

15+
If you are familiar with NHibernate inner working and want to directly fix the issue, you may also contribute a PR without writing a separated issue, provided you describe the fixed issue in the PR.
16+
1517
## Fork and Clone from GitHub
1618

1719
The main GitHub repository is at [https://github.com/nhibernate/nhibernate-core][2]. If you plan to contribute your test case or improvement back to NHibernate, you should visit that page and fork the repository so you can commit your own changes and then submit a pull request.
@@ -44,10 +46,11 @@ The main GitHub repository is at [https://github.com/nhibernate/nhibernate-core]
4446
In most cases, you will be adding your test to the NHibernate.Test project. If there is a test that only works with VisualBasic, then add it to the NHibernate.Test.VisualBasic project instead.
4547

4648
1. Open **NHibernate.sln** from the src folder.
47-
2. If adding a C# test, go to the NHSpecificTest folder in the NHibernate.Test project. If adding a VisualBasic test, go to the Issues folder in the NHibernate.Test.VisualBasic project.
48-
3. Copy and paste the GH0000 folder to create a duplicate test ("Copy of GH0000").
49-
4. Replace the four instances of GH0000 with your issue number.
50-
5. Edit the test as you see fit. Don't commit yet; there are details in a later step.
49+
2. If adding a VisualBasic test, go to the Issues folder in the NHibernate.Test.VisualBasic project. If adding a C# test, go to the NHibernate.Test project.
50+
3. C# only: either find the suitable feature folder and add your test there without following the two next points, or go to the NHSpecificTest folder.
51+
4. Copy and paste the GH0000 folder to create a duplicate test ("Copy of GH0000").
52+
5. Replace the four instances of GH0000 with your issue number.
53+
6. Edit the test as you see fit. Don't commit yet; there are details in a later step.
5154

5255
Do not use anymore the NHxxxx naming, they match issue numbers from https://nhibernate.jira.com/
5356

@@ -63,7 +66,9 @@ NHibernate has migrated its issue tracking from Jira to GitHub, and using the Ji
6366
4. Select and run the test.
6467
5. You can also make the test project your startup project and it will run NUnit when you press F5.
6568

66-
### Third Party NUnit Test Runner This would be something like ReSharper.
69+
### Third Party NUnit Test Runner
70+
71+
This could be something like ReSharper.
6772

6873
1. Sometimes tests fail when run under x64. If required (ex. SQLite and Firebird), go to the project properties Build tab and set the target to x86.
6974
2. Next, just run the tests as usual.
@@ -91,11 +96,11 @@ Please note that some tests assume a case insensitive accent sensitive database
9196

9297
## Submit a Pull Request
9398

94-
If you are fixing an existing issue, please make sure to include this issue number in your GitHub pull request.
99+
If you are fixing an existing issue, please make sure to include this issue number in your GitHub pull request. (Use the # prefix instead of GH for automatically having a link to it.)
95100

96-
We use tabs for code indentation, not spaces. As this is not the default in Visual Studio, you will need to reconfigure Visual Studio to indent with tabs whenever you work on the NHibernate codebase. To make this easier, NHibernate has an [editorconfig][3] configuration file to switch Visual Studio automatically between tabs and spaces mode. It is recommended you install editorconfig from the Visual Studio Extension Manager.
101+
We use tabs for code indentation, not spaces. To make this easier, NHibernate has an [editorconfig][3] configuration file to switch Visual Studio automatically between tabs and spaces mode.
97102

98-
After submitting your pull request, come back later to check the outcome of automated builds. If some have failed, they will be listed in your pull request with a link to the corresponding TeamCity build. Find out in the build which tests are newly failing, and take appropriate action. Some of those builds have many known failing tests, which does not trigger a build failure. A *Comparison.txt* file in build Artifacts may help finding which failing tests are not known failing tests and must be addressed.
103+
After submitting your pull request, come back later to check the outcome of automated builds. If some have failed, they will be listed in your pull request with a link to the corresponding TeamCity build. Find out in the build which tests are newly failing, and take appropriate action. Some of those builds may have known failing tests, which does not trigger a build failure. In this case a *Comparison.txt* file in build Artifacts may help finding which failing tests are not known failing tests and must be addressed.
99104

100105
## Further Discussion
101106

GitReleaseManager.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ issue-labels-include:
55
- "t: New Feature"
66
- "t: Improvement"
77
- "t: Task"
8+
- "t: Tests"
89
issue-labels-exclude:
910
- "r: Duplicate"
1011
- "r: External Issue"
@@ -26,3 +27,6 @@ issue-labels-alias:
2627
- name: "t: Task"
2728
header: Task
2829
plural: Task
30+
- name: "t: Tests"
31+
header: Tests
32+
plural: Tests

ReleaseProcedure.txt

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,57 @@
11
These are the tasks typically needed to create an official NHibernate release.
22

3-
43
* In GitHub, make sure no open issues have milestone set to the release
5-
that is about to happen (as these will show in the release notes).
6-
7-
* Update releasenotes.txt with list of issues. See if any additions to the
8-
list of "known breaking changes" are necessary.
9-
10-
* Check/update version number in build-common/common.xml.
11-
4+
that is about to happen (as these will show in the milestone).
5+
6+
* Create a draft release in Github with GitReleaseManager. If you have used
7+
the NHibernate build menu, it should be available in Tools\gitreleasemanage.x.x.x\
8+
(change x.x.x by its current version in tools).
9+
By example:
10+
11+
Tools\gitreleasemanager.0.7.0\tools\GitReleaseManager.exe create -o nhibernate -r nhibernate-core -m 5.1 -u username -p password
12+
13+
(Adjust the -m milestone parameter above, and add "-c branchname" if
14+
releasing another branch than master)
15+
16+
* Update releasenotes.txt with the list of issues generated in the GitHub
17+
draft release. Add to the list the release task.
18+
See if any additions to the list of "known breaking changes" are necessary.
19+
20+
* Update the GitHub draft release for matching other release formalism: ensure
21+
its tag matches the released version (three parts: major.minor.release), update
22+
its title, change its description for listing only highlights and breaking
23+
changes, include links to the milestone and the releasenotes of the release
24+
tag, include links to binaries on SourceForge and NuGet.
25+
If the release tag does not match the released version with major.minor.release
26+
formalism, the NuGet package will have an invalid link to release notes.
27+
28+
* Check/update version number in common.xml and NHibernate.props under
29+
build-common folder, in master.xml under doc\reference folder, and in
30+
appveyor.yml in the NHibernate root.
31+
1232
* Don't forget to commit the above.
13-
14-
* Perform the release build including running all tests (GaRelease.bat or
15-
ShowBuildMenu.bat).
16-
17-
NOTE: If you prefer to keep your source code in a path like e.g.:
18-
C:\Users\Something\Long\Projects\nhibernate-core
19-
you may want to issue a command like:
20-
subst P: C:\Users\Something\Long\Projects
21-
And then change to P:\nhibernate-core before building. This will avoid
22-
displaying a long user-specific path in public symbol files.
23-
24-
* If no error or other issue requiring further changes occurred, tag the
25-
current git HEAD with a tag according to version number. Don't forget to
26-
push the tag to github.
27-
33+
34+
* Check the CI release build.
35+
If no error or other issue requiring further changes occurred, merge
36+
the release PR and wait for the resulting commit CI release build.
37+
38+
* Retrieve the artifacts of the CI release build.
39+
2840
* Upload binary and source zip files to SourceForge. Update the "latest
2941
release".
3042

31-
* Update download link on nhibernate.info.
32-
33-
* Push nuget packages including the symbol packages. The nuget packages
34-
should already be available in the build directory, together with a batch
35-
file to push them.
36-
37-
* In GitHub, mark the milestone as released.
38-
43+
* Update download link on nhibernate.info. Update the reference documentation
44+
if needed.
45+
46+
* Push nuget packages including the symbol packages.
47+
48+
* In GitHub, mark the milestone as released and publish the release draft,
49+
creating the release tag by the way. (It should match the tag in the
50+
releasenotes link of the release description.)
51+
3952
* Post release announcement to nhusers, nhibernate-development and as
4053
project news on SourceForge.
41-
54+
4255
* If this was a stable branch, merge it forward to master. Perhaps some
4356
changes need to be edited out in the merge, but this will reduce the
44-
risk of some issue being left unfixed on master.
57+
risk of some issue being left unfixed on master.

ShowBuildMenu.bat

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ echo E. Add a test configuration for Oracle.
5151
echo F. Add a test configuration for Oracle with managed driver.
5252
echo G. Add a test configuration for SQL Server Compact.
5353
echo H. Add a test configuration for MySql.
54+
echo I. Add a test configuration for SAP HANA.
5455
echo.
5556
echo X. Exit to main menu.
5657
echo.
5758

58-
%BUILDTOOL% prompt ABCDEFGHX
59-
if errorlevel 8 goto main-menu
59+
%BUILDTOOL% prompt ABCDEFGHIX
60+
if errorlevel 9 goto main-menu
61+
if errorlevel 8 goto test-setup-hana
6062
if errorlevel 7 goto test-setup-mysql
6163
if errorlevel 6 goto test-setup-sqlserverce
6264
if errorlevel 5 goto test-setup-oracle-managed
@@ -122,6 +124,13 @@ set LIB_FILES=
122124
set LIB_FILES2=
123125
goto test-setup-generic
124126

127+
:test-setup-hana
128+
set CONFIG_NAME=HANA
129+
set TEST_PLATFORM=AnyCPU
130+
set LIB_FILES=
131+
set LIB_FILES2=
132+
goto test-setup-generic
133+
125134
:test-setup-generic
126135
set CFGNAME=
127136
set /p CFGNAME=Enter a name for your test configuration or press enter to use default name:

Tools/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ nuget.exe
22
NUnit.*
33
vswhere.*
44
CSharpAsyncGenerator.CommandLine.*
5+
gitreleasemanager.*

Tools/packages.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net461" />
88
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net461" />
99
<package id="NUnit.Extension.VSProjectLoader" version="3.6.0" targetFramework="net461" />
10-
<package id="CSharpAsyncGenerator.CommandLine" version="0.8.2" targetFramework="net461" />
10+
<package id="CSharpAsyncGenerator.CommandLine" version="0.8.2.6" targetFramework="net461" />
1111
<package id="vswhere" version="2.1.4" targetFramework="net461" />
12+
<package id="gitreleasemanager" version="0.7.0" targetFramework="net461" />
1213
</packages>

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 5.1.0.{build}
1+
version: 5.1.2.{build}
22
image: Visual Studio 2017
33
environment:
44
matrix:
@@ -63,4 +63,4 @@ on_finish:
6363
$wc = New-Object 'System.Net.WebClient'
6464
Get-Item '*-TestResult.xml' | ForEach-Object {
6565
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit3/$($env:APPVEYOR_JOB_ID)", $_)
66-
}
66+
}

build-common/DotNetSdkMono.props

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
The MIT License (MIT)
4+
5+
Copyright (c) Microsoft Corporation.
6+
All rights reserved.
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy
9+
of this software and associated documentation files (the "Software"), to deal
10+
in the Software without restriction, including without limitation the rights
11+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
copies of the Software, and to permit persons to whom the Software is
13+
furnished to do so, subject to the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included in all
16+
copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
SOFTWARE.
25+
-->
26+
<!-- Copied from here: https://github.com/Microsoft/visualfsharp/blob/cb9e692331c2f0d66b0f72d49a07533204011517/fcs/netfx.props -->
27+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
28+
<PropertyGroup>
29+
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
30+
<!-- have to teach MSBuild where the Mono copy of the reference assemblies is -->
31+
<TargetIsMono Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">true</TargetIsMono>
32+
33+
<!-- Look in the standard install locations -->
34+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
35+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
36+
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND '$(TargetIsMono)' == 'true' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
37+
38+
<!-- If we found Mono reference assemblies, then use them -->
39+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
40+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
41+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
42+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
43+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
44+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
45+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
46+
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
47+
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
48+
49+
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
50+
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
51+
</PropertyGroup>
52+
</Project>

build-common/NHibernate.props

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
<Project>
2+
<Import Project="DotNetSdkMono.props" />
23
<PropertyGroup>
34
<VersionMajor Condition="'$(VersionMajor)' == ''">5</VersionMajor>
4-
<VersionMinor Condition="'$(VersionMinor)' == ''">0</VersionMinor>
5-
<VersionPatch Condition="'$(VersionPatch)' == ''">3</VersionPatch>
5+
<VersionMinor Condition="'$(VersionMinor)' == ''">1</VersionMinor>
6+
<VersionPatch Condition="'$(VersionPatch)' == ''">2</VersionPatch>
67
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
78

89
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
910
<AssemblyVersion>$(VersionMajor).$(VersionMinor).0.0</AssemblyVersion>
1011
<FileVersion>$(VersionPrefix).0</FileVersion>
1112

13+
<NhAppTargetFrameworks>net461;netcoreapp2.0</NhAppTargetFrameworks>
14+
<NhLibTargetFrameworks>net461;netcoreapp2.0;netstandard2.0</NhLibTargetFrameworks>
15+
1216
<Product>NHibernate</Product>
1317
<Company>NHibernate.info</Company>
1418
<Copyright>Licensed under LGPL.</Copyright>
@@ -19,6 +23,7 @@
1923
<PackageIconUrl>https://raw.githubusercontent.com/nhibernate/nhibernate-core/master/logo/NHibernate-NuGet.png</PackageIconUrl>
2024
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
2125
<PackageLicenseUrl>https://raw.githubusercontent.com/nhibernate/nhibernate-core/master/LICENSE.txt</PackageLicenseUrl>
26+
<PackageReleaseNotes>https://github.com/nhibernate/nhibernate-core/blob/$(VersionPrefix)/releasenotes.txt</PackageReleaseNotes>
2227
<RepositoryUrl>https://github.com/nhibernate/nhibernate-core.git</RepositoryUrl>
2328
<RepositoryType>git</RepositoryType>
2429

build-common/common.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
<!-- This is used only for build folder -->
1515
<!-- TODO: Either remove or refactor to use NHibernate.props -->
16-
<property name="project.version" value="5.0.3" overwrite="false" />
17-
<property name="project.version.numeric" value="5.0.3" overwrite="false" />
16+
<property name="project.version" value="5.1.2" overwrite="false" />
17+
<property name="project.version.numeric" value="5.1.2" overwrite="false" />
1818

1919
<!-- properties used to connect to database for testing -->
2020
<include buildfile="nhibernate-properties.xml" />

default.build

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,21 @@
319319
<in>
320320
<items>
321321
<include name="${nuget.nupackages.dir}/*.nupkg"/>
322+
<exclude name="${nuget.nupackages.dir}/*.symbols.nupkg"/>
322323
</items>
323324
</in>
324325
<do>
325-
<echo message="nuget push ${filename} ${environment::newline()}" file="${nuget.nupackages.pushbatfile}" append="true"/>
326+
<echo message="nuget push -source https://nuget.org/ ${path::get-file-name(filename)} ${environment::newline()}" file="${nuget.nupackages.pushbatfile}" append="true"/>
327+
</do>
328+
</foreach>
329+
<foreach item="File" property="filename">
330+
<in>
331+
<items>
332+
<include name="${nuget.nupackages.dir}/*.symbols.nupkg"/>
333+
</items>
334+
</in>
335+
<do>
336+
<echo message="nuget push -source https://nuget.smbsrc.net/ ${path::get-file-name(filename)} ${environment::newline()}" file="${nuget.nupackages.pushbatfile}" append="true"/>
326337
</do>
327338
</foreach>
328339
</target>

0 commit comments

Comments
 (0)