Skip to content

Commit 06b6b5e

Browse files
committed
Merge branch 'master' into persister
2 parents 1dc7c7b + 92de0b7 commit 06b6b5e

File tree

3,316 files changed

+237274
-132665
lines changed

Some content is hidden

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

3,316 files changed

+237274
-132665
lines changed

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ insert_final_newline = true
66

77
[*.cs]
88
indent_style = tab
9+
dotnet_sort_system_directives_first = true
10+
csharp_space_after_cast = true
911

1012
[*.xsd]
1113
indent_style = tab
14+
15+
[*.json]
16+
indent_style = space
17+
indent_size = 2
18+
19+
[*.xml]
20+
indent_style = space
21+
indent_size = 2
22+
23+
[*.csproj]
24+
indent_style = space
25+
indent_size = 2
26+
27+
[*.vbproj]
28+
indent_style = space
29+
indent_size = 2
30+
31+
[*.cshtml]
32+
indent_style = space
33+
indent_size = 4

.gitattributes

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
*.msbuild text
1313
*.md text
1414

15-
*.sln text eol=crlf merge=union
16-
*.csproj text merge=union
17-
*.vbproj text merge=union
18-
*.fsproj text merge=union
19-
*.dbproj text merge=union
15+
*.sln text eol=crlf
16+
*.csproj text eol=crlf
17+
*.vbproj text eol=crlf
18+
*.fsproj text eol=crlf
19+
*.dbproj text eol=crlf
2020

2121
# Resharper DotSettings files are in Unix format
2222
*.DotSettings text eol=lf

.travis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
language: csharp
2+
mono: latest
3+
dotnet: 2.1.2
4+
sudo: required
5+
services:
6+
- mysql
7+
- postgresql
8+
- docker
9+
env:
10+
- DB=SqlServer2008 CONNECTION_STRING="Server=localhost;initial catalog=nhibernate;User Id=sa;Password=P@ssw0rd;packet size=4096;"
11+
- DB=PostgreSQL CONNECTION_STRING="Host=localhost;Port=5432;Username=postgres;Database=nhibernate;Enlist=true;"
12+
- DB=Firebird
13+
- DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;"
14+
matrix:
15+
allow_failures:
16+
- env: DB=MySQL CONNECTION_STRING="Server=127.0.0.1;Uid=root;Database=nhibernate;Old Guids=True;"
17+
before_install:
18+
- curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
19+
- curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
20+
- sudo apt-get update -qq
21+
- sudo apt-get install -y powershell
22+
- |-
23+
if [[ "$DB" == "MySQL" ]]
24+
then
25+
echo -e '[server]\nlower_case_table_names=1' | sudo tee -a /etc/mysql/my.cnf
26+
sudo service mysql restart
27+
fi
28+
- |-
29+
if [[ "$DB" == "Firebird" ]]
30+
then
31+
sudo apt-get install -y libicu-dev libtommath-dev curl
32+
curl -L -O https://github.com/FirebirdSQL/firebird/releases/download/R3_0_3/Firebird-3.0.3.32900-0.amd64.tar.gz
33+
tar xzvf Firebird-3.0.3.32900-0.amd64.tar.gz
34+
pushd Firebird-3.0.3.32900-0.amd64
35+
sudo ./install.sh -silent
36+
popd
37+
export $(sudo cat /opt/firebird/SYSDBA.password | grep -v ^# | xargs)
38+
sudo chmod 775 /tmp/firebird
39+
echo -e "nhibernate = /tmp/firebird/nhibernate.fdb" | sudo tee -a /opt/firebird/databases.conf
40+
echo -e "AuthServer = Srp\nAuthClient = Srp\nUserManager = Srp\nWireCrypt = Enabled" | sudo tee -a /opt/firebird/firebird.conf
41+
sudo /opt/firebird/bin/gsec -modify SYSDBA -pw masterkey -admin yes
42+
sudo service firebird restart
43+
fi
44+
before_script:
45+
- if [[ "$DB" == "SqlServer2008" ]]; then docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=P@ssw0rd" -e "MSSQL_PID=Express" -p 1433:1433 -d --name sqlexpress microsoft/mssql-server-linux:latest; fi
46+
- if [[ "$DB" == "PostgreSQL" ]]; then psql -c "CREATE DATABASE nhibernate;" -U postgres; fi
47+
- if [[ "$DB" == "MySQL" ]]; then mysql -e "CREATE DATABASE IF NOT EXISTS nhibernate;"; fi
48+
script:
49+
- pwsh -noprofile -command "& ./build.ps1 -TaskList Set-Configuration,Test -properties @{\"Database\" = \"$DB\";\"ConnectionString\"=\"$CONNECTION_STRING\"}"

CONTRIBUTING.md

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@ This document describes the policies and procedures for working with NHibernate.
44

55
For the least friction, please follow the steps in the order presented, being careful not to miss any. There are many details in this document that will help your contribution go as smoothly as possible. Please read it thoroughly.
66

7-
## Check for Existing Issues Visit
7+
## Create or find a GitHub Issue
88

9-
[https://nhibernate.jira.com][1] and search for your issue. If you see it, voting for it is a good way to increase the visibility of the issue.
10-
## Create a JIRA Issue
9+
GitHub is used to generate the release notes and serves as a central point of reference for all changes that have occurred to NHibernate.
1110

12-
JIRA is used to generate the release notes and serves as a central point of reference for all changes that have occurred to NHibernate.
11+
Visit [https://github.com/nhibernate/nhibernate-core/issues][1] and search for your issue. If you see it, giving it a like is a good way to increase the visibility of the issue.
1312

14-
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. Ex. NH-2318
13+
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.
1514

1615
## Fork and Clone from GitHub
1716

18-
The main GitHub repository is at <https://github.com/nhibernate/nhibernate-core>. 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.
17+
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.
1918

2019
## The Build Menu
2120

@@ -35,29 +34,32 @@ The main GitHub repository is at <https://github.com/nhibernate/nhibernate-core>
3534
## Setting up For Development
3635

3736
1. Install your favorite database and optionally set up a user capable of creating and dropping a database called **nhibernate**. There are some per-database instructions in the lib/teamcity/* folders, which you may find helpful. For SQL Server, you might be able to use the **localhost\sqlexpress** instance installed with Visual Studio. Often people already have databases set up, so you might not even need to do anything in this step.
38-
2. Run the build menu and select the option A to create the AssemblyInfo.cs files.
39-
3. Run the build menu and select option B to create a new test configuration. Notepad will pop up and you should edit the connection string information, saving it when you're done. These configurations will appear in the "available-test-configurations" folder.
40-
4. Run the build menu and select option C to activate the test configuration you created. The appropriate configuration will be copied to the "current-test-configuration" folder.
41-
5. (Optional) Run all the tests with option D and hopefully you will see no failing tests. The build may fail on certain databases; please ask on the mailing list if you are having trouble.
42-
6. Before using the database for unit tests from Visual Studio, you'll need to create an empty database that matches your connection string. [NH-2866][2] will make this easier, but for now you just have to drop/create the database specified in your connection string yourself.
37+
2. Run the build menu and select option B to create a new test configuration. Notepad will pop up and you should edit the connection string information, saving it when you're done. These configurations will appear in the "available-test-configurations" folder.
38+
3. Run the build menu and select option C to activate the test configuration you created. The appropriate configuration will be copied to the "current-test-configuration" folder.
39+
4. (Optional) Run all the tests with option D and hopefully you will see no failing tests. The build may fail on certain databases; please ask on the mailing list if you are having trouble.
40+
5. Before using the database for unit tests from Visual Studio, you'll need to create an empty database that matches your connection string.
4341

4442
## Creating a Test Case to Verify the Issue
4543

4644
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.
4745

4846
1. Open **NHibernate.sln** from the src folder.
4947
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.
50-
3. Copy and paste the NH0000 folder to create a duplicate test ("Copy of NH0000").
51-
4. Replace the four (five for vb) instances of NH0000 with your issue number.
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.
5250
5. Edit the test as you see fit. Don't commit yet; there are details in a later step.
5351

52+
Do not use anymore the NHxxxx naming, they match issue numbers from https://nhibernate.jira.com/
53+
54+
NHibernate has migrated its issue tracking from Jira to GitHub, and using the Jira naming may lead to conflicts with previous Jira issues.
55+
5456
## Running Your Unit Test
5557

5658
### Debugging Through Included NUnit GUI
5759

5860
1. Right click on the project (ex. NHibernate.Test) in Visual Studio.
5961
2. Select: Debug -> Start New Instance
60-
3. Type the name of your unit test to quickly go to it. For example: NH2318
62+
3. Type the name of your unit test to quickly go to it. For example: GH2318
6163
4. Select and run the test.
6264
5. You can also make the test project your startup project and it will run NUnit when you press F5.
6365

@@ -66,13 +68,16 @@ In most cases, you will be adding your test to the NHibernate.Test project. If t
6668
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.
6769
2. Next, just run the tests as usual.
6870

71+
## Regenerate async code
72+
73+
NHibernate uses a code generator for its async implementation and tests. If your changes, including tests, involve any synchronous method having an async
74+
counter-part, you should regenerate the async code. Use build-menu option H for this. Then test any async counter-part it may have generated from your tests.
75+
6976
## Commit your Test Case
7077

7178
Ensure that your e-mail address and name are configured appropriately in Git.
7279

73-
Create a feature branch so it's easy to keep it separate from other improvements. Having a pull request accepted might involve further commits based on community feedback, so having the feature branch provides a tidy place to work from. Using the issue number as the branch name is good practice.
74-
75-
When you commit, please include the issue number in your commit message. This will allow the JIRA issue tracker to automatically link your commits to the issue. By example: *NH-1234 - test case for blah trouble*. Make sure you do not put any non whitespace character adjacent to the issue number, as this would prevent JIRA to match it. (Avoid *NH-1234: test case for blah trouble*.)
80+
Create a feature branch so it's easy to keep it separate from other improvements. Having a pull request accepted might involve further commits based on community feedback, so having the feature branch provides a tidy place to work from. Using the issue number as the branch name is good practice.
7681

7782
## Implementing the Bug Fix or Improvement
7883

@@ -86,19 +91,21 @@ Please note that some tests assume a case insensitive accent sensitive database
8691

8792
## Submit a Pull Request
8893

89-
Be sure to link to the JIRA issue in your GitHub pull request. Also, go back to your JIRA issue and link to the pull request.
94+
If you are fixing an existing issue, please make sure to include this issue number in your GitHub pull request.
9095

9196
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.
9297

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.
99+
93100
## Further Discussion
94101

95-
The NHibernate team monitors JIRA and GitHub regularly, so your request will be noticed. If you want to discuss it further, you are welcome to post to the [nhibernate-development mailing list][4].
102+
The NHibernate team monitors GitHub regularly, so your request will be noticed. If you want to discuss it further, you are welcome to post to the [nhibernate-development mailing list][4].
96103

97104
## Happy Contributing!
98105

99106
The NHibernate community values your contributions. Thank you for the time you have invested.
100107

101-
[1]: https://nhibernate.jira.com/
102-
[2]: https://nhibernate.jira.com/browse/NH-2866
108+
[1]: https://github.com/nhibernate/nhibernate-core/issues/
109+
[2]: https://github.com/nhibernate/nhibernate-core/
103110
[3]: http://www.editorconfig.org/
104111
[4]: http://groups.google.com/group/nhibernate-development

0 commit comments

Comments
 (0)