diff --git a/.gitattributes b/.gitattributes index 412eeda78d..269bc192f0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,22 +1,45 @@ -# Auto detect text files and perform LF normalization +# Catch all for anything we forgot. Add rules if you get CRLF to LF warnings. * text=auto -# Custom for Visual Studio -*.cs diff=csharp -*.sln merge=union -*.csproj merge=union -*.vbproj merge=union -*.fsproj merge=union -*.dbproj merge=union +# Text files that should be normalized to LF in odb. +*.cs text eol=lf diff=csharp +*.xaml text +*.config text +*.c text +*.h text +*.cpp text +*.hpp text -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain +*.sln text +*.csproj text +*.vcxproj text + +*.md text +*.tt text +*.sh text +*.ps1 text +*.cmd text +*.bat text +*.markdown text +*.msbuild text + + +# Binary files that should not be normalized or diffed +*.png binary +*.jpg binary +*.gif binary +*.ico binary +*.rc binary + +*.pfx binary +*.snk binary +*.dll binary +*.exe binary +*.lib binary +*.exp binary +*.pdb binary +*.sdf binary +*.7z binary + +# Generated file should just use CRLF, it's fiiine +SolutionInfo.cs text eol=crlf diff=csharp diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000000..6dd154fbc4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,27 @@ +***Note*: for support questions, please ask on StackOverflow: https://stackoverflow.com/questions/tagged/reactiveui . This repository's issues are reserved for feature requests and bug reports.** + +**Do you want to request a *feature* or report a *bug*?** + + + +**What is the current behavior?** + + + +**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem** + + + +**What is the expected behavior?** + + + +**What is the motivation / use case for changing the behavior?** + + + +**Which versions of ReactiveUI, and which platform / OS are affected by this issue? Did this work in previous versions of ReativeUI? Please also test with the latest stable and snapshot (http://docs.reactiveui.net/en/contributing/snapshot/index.html) versions.** + + + +**Other information (e.g. stacktraces, related issues, suggestions how to fix)** diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..9bea756b90 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,23 @@ +**What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)** + + + +**What is the current behavior? (You can also link to an open issue here)** + + + +**What is the new behavior (if this is a feature change)?** + + + +**Does this PR introduce a breaking change?** + + + +**Please check if the PR fulfills these requirements** +- [ ] The commit follows our guidelines: https://github.com/reactiveui/reactiveui#contribute +- [ ] Tests for the changes have been added (for bug fixes / features) +- [ ] Docs have been added / updated (for bug fixes / features) + +**Other information**: + diff --git a/.gitignore b/.gitignore index d944c29a3c..112c1fdee8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,27 +4,34 @@ # User-specific files *.suo *.user +*.userosscache *.sln.docstates +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ +x86/ build/ bld/ [Bb]in/ [Oo]bj/ -# Roslyn cache directories -*.ide/ +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* -#NUNIT +# NUNIT *.VisualState.xml TestResult.xml @@ -33,6 +40,12 @@ TestResult.xml [Rr]eleasePS/ dlldata.c +# DNX +*.lock.json +artifacts/ +*.nuget.props +*.nuget.targets + *_i.c *_p.c *_i.h @@ -65,6 +78,7 @@ _Chutzpah* ipch/ *.aps *.ncb +*.opendb *.opensdf *.sdf *.cachefile @@ -73,6 +87,7 @@ ipch/ *.psess *.vsp *.vspx +*.sap # TFS 2012 Local Workspace $tf/ @@ -85,7 +100,7 @@ _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user -# JustCode is a .NET coding addin-in +# JustCode is a .NET coding add-in .JustCode # TeamCity is a build add-in @@ -97,6 +112,7 @@ _TeamCity* # NCrunch _NCrunch_* .*crunch*.local.xml +nCrunchTemp_* # MightyMoose *.mm.* @@ -124,35 +140,40 @@ publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml -## TODO: Comment the next line if you want to checkin your -## web deploy settings but do note that will include unencrypted -## passwords +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted *.pubxml +*.publishproj -# NuGet Packages Directory -packages/* -## TODO: If the tool you use requires repositories.config -## uncomment the next line -!packages/repositories.config - -# Enable "build/" folder in the NuGet Packages folder since -# NuGet packages use it for MSBuild targets. -# This line needs to be after the ignore of the build folder -# (and the packages folder if the line above has been uncommented) -!packages/build/ +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config # Windows Azure Build Output csx/ *.build.csdef +# Windows Azure Emulator +ecf/ +rcf/ + # Windows Store app package directory AppPackages/ +BundleArtifacts/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ # Others -sql/ -*.Cache ClientBin/ -[Ss]tyle[Cc]op.* ~$* *~ *.dbmdl @@ -160,6 +181,7 @@ ClientBin/ *.pfx *.publishsettings node_modules/ +orleans.codegen.cs # RIA/Silverlight projects Generated_Code/ @@ -184,28 +206,36 @@ UpgradeLog*.htm # Microsoft Fakes FakesAssemblies/ -# RxUI build directories -Release -NuGet-Release - -# Ensure all files in the NuGet directory are tracked. -!NuGet/** +# GhostDoc plugin setting file +*.GhostDoc.xml -*.nupkg -*.userprefs +# Node.js Tools for Visual Studio +.ntvs_analysis.dat -version-bump.patch +# Visual Studio 6 build log +*.plg -ReactiveUI.Events/Events.cs -ReactiveUI.Events/Events_*.cs +# Visual Studio 6 workspace options file +*.opt -ReactiveUI.Events/EventBuilder.exe -ReactiveUI.Events/EventBuilder.exe.mdb -ReactiveUI.Events/Mono.* -ReactiveUI.Events/Nustache.* +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions -ext/monodroid/18 +# Paket dependency manager +.paket/paket.exe +# FAKE - F# Make +.fake/ +# Tools +tools/ -.DS_Store +# ReactiveUI +artifacts/ +src/CommonAssemblyInfo.cs +src/ReactiveUI.Events/Events_*.cs diff --git a/.hgeol b/.hgeol new file mode 100644 index 0000000000..42e4c0ce81 --- /dev/null +++ b/.hgeol @@ -0,0 +1,2 @@ +[repository] +native = LF diff --git a/.nuget/NuGet.exe b/.nuget/NuGet.exe deleted file mode 100644 index c41a0d0deb..0000000000 Binary files a/.nuget/NuGet.exe and /dev/null differ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..f3a1be431c --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,50 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, and in the interest of +fostering an open and welcoming community, we pledge to respect all people who +contribute through reporting issues, posting feature requests, updating +documentation, submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free +experience for everyone, regardless of level of experience, gender, gender +identity and expression, sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, such as physical or electronic + addresses, without explicit permission +* Other unethical or unprofessional conduct + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +By adopting this Code of Conduct, project maintainers commit themselves to +fairly and consistently applying these principles to every aspect of managing +this project. Project maintainers who do not follow or enforce the Code of +Conduct may be permanently removed from the project team. + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting a project maintainer at paul@paulbetts.org. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. Maintainers are +obligated to maintain confidentiality with regard to the reporter of an +incident. + + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.3.0, available at +[http://contributor-covenant.org/version/1/3/0/][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/3/0/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index db38240f8b..1c49020e91 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,35 +1,200 @@ -## The quick version +# Contributing to ReactiveUI -1. Open `ReactiveUI.sln` in VS2012 / VS2013 -1. Run tests, build ReactiveUI.sln in VS2012 on Win8 -1. Submit PR +We'd love for you to contribute to our source code and to make reactiveui even better than it is +today! Here are the guidelines we'd like you to follow: + - [Code of Conduct](#coc) + - [Question or Problem?](#question) + - [Issues and Bugs](#issue) + - [Feature Requests](#feature) + - [Submission Guidelines](#submit) + - [Coding Rules](#rules) + - [Commit Message Guidelines](#commit) -## How to start hacking on ReactiveUI (the more verbose version) +## Code of Conduct -1. Fork and Clone the source -1. Create a new branch for your feature / bugfix -1. Open the ReactiveUI.sln solution - this is the one you should use unless you're hacking on platform-specific code. -1. Run all the tests, make sure they pass. -1. Write some new tests that fail -1. Make your change -1. See those same tests pass! Hurrah! -1. Push that branch to GitHub (`git push -u origin my-cool-new-feature`) -1. Go to your fork on GitHub, you should see a button with your branch next to it labeled 'Pull Request' -1. Type up some information about your change +Help us keep the project open and inclusive. Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md). -## To make a new NuGet release for private use +## Got a Question or Problem? -*This looks hard, but once you get your environment set up, it's really only 'Build in VS, build in Mono, run script'* +If you have questions about how to use reactiveui, please direct these to [StackOverflow](https://stackoverflow.com/questions/tagged/reactiveui). The project maintainers hang out in this [Slack](https://github.com/reactiveui/reactiveui#slack) channel. -1. Put the source into DropBox or another way you can share the same folder between a Mac and a PC (Parallels Shared Folders works too) -1. Edit `/CommonAssemblyInfo.cs` and bump the version -1. Open ReactiveUI.sln and build it in Release mode under VS2012 on Windows 8 / Win8.1 with the WP8 SDK installed (nothing earlier is supported) -1. Open MonoDevelop, and build ReactiveUI_XSAll.sln in Release mode -1. Back on the PC, run `MakeRelease.ps1` and specify a NuGet SemVer, like `MakeRelease.ps1 -version "5.5.0-beta1"` -1. You'll end up with two new folders, `Release` and `Nuget-Release`, as well as the `.nupkg` files in the root directory. +## Found an Issue? -## Some quirks +If you find a bug in the source code or a mistake in the documentation, you can help us by +submitting an issue to our [GitHub Repository](https://github.com/reactiveui/reactiveui). Even better you can submit a Pull Request +with a fix. -* The only 100% guaranteed .sln files to be maintained are ReactiveUI.sln and ReactiveUI_XSAll.sln - the others may be missing projects -* Please follow my coding convention when submitting PRs - `if` statements have the brackets on the same line, non-public methods shouldBeCasedLikeThis, etc etc. I know I'm weird, Deal With It(tm). +**Please see the [Submission Guidelines](#submit) below.** + +## Want a Feature? + +You can request a new feature by submitting an issue to our [GitHub Repository](https://github.com/reactiveui/reactiveui). If you +would like to implement a new feature then consider what kind of change it is: + +* **Major Changes** that you wish to contribute to the project should be discussed first in [Slack](https://github.com/reactiveui/reactiveui#slack) so that we can better coordinate our efforts, + prevent duplication of work, and help you to craft the change so that it is successfully accepted + into the project. +* **Small Changes** can be crafted and submitted to the [GitHub Repository](https://github.com/reactiveui/reactiveui) as a Pull + Request. + +## Submission Guidelines + +### Submitting an Issue + +If your issue appears to be a bug, and hasn't been reported, open a new issue. Help us to maximize +the effort we can spend fixing issues and adding new features, by not reporting duplicate issues. + +Providing the following information will increase the chances of your issue being dealt with +quickly: + +* **Overview of the Issue** - if an error is being thrown a stack trace helps +* **Motivation for or Use Case** - explain why this is a bug for you +* **reactiveui Version(s)** - is it a regression? +* **Operating System** - is this a problem with all browsers or only specific ones? +* **Reproduce the Error** - provide a example or an unambiguous set of steps. +* **Related Issues** - has a similar issue been reported before? +* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be + causing the problem (line of code or commit) + +**If you get help, help others. Good karma rulez!** + +### Submitting a Pull Request +Before you submit your pull request consider the following guidelines: + +* Search [GitHub](https://github.com/reactiveui/reactiveui/pulls) for an open or closed Pull Request + that relates to your submission. You don't want to duplicate effort. +* Make your changes in a new git branch: + + ```shell + git checkout -b my-fix-branch master + ``` + +* Create your patch, **including appropriate test cases**. +* Follow our [Coding Rules](#rules). +* Run the test suite, as described below. +* Commit your changes using a descriptive commit message that follows our + [commit message conventions](#commit). + + ```shell + git commit -a + ``` + Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. + +* Build your changes locally to ensure all the tests pass: + + ```shell + build.cmd + ``` + +* Push your branch to GitHub: + + ```shell + git push origin my-fix-branch + ``` + +In GitHub, send a pull request to `reactiveui:master`. + +If we suggest changes, then: + +* Make the required updates. +* Re-run the test suite to ensure tests are still passing. +* Commit your changes to your branch (e.g. `my-fix-branch`). +* Push the changes to your GitHub repository (this will update your Pull Request). + +If the PR gets too outdated we may ask you to rebase and force push to update the PR: + +```shell +git rebase master -i +git push origin my-fix-branch -f +``` + +_WARNING: Squashing or reverting commits and force-pushing thereafter may remove GitHub comments +on code that were previously made by you or others in your commits. Avoid any form of rebasing +unless necessary._ + +That's it! Thank you for your contribution! + +#### After your pull request is merged + +After your pull request is merged, you can safely delete your branch and pull the changes +from the main (upstream) repository: + +* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: + + ```shell + git push origin --delete my-fix-branch + ``` + +* Check out the master branch: + + ```shell + git checkout master -f + ``` + +* Delete the local branch: + + ```shell + git branch -D my-fix-branch + ``` + +* Update your master with the latest upstream version: + + ```shell + git pull --ff upstream master + ``` + +## Coding Rules + +To ensure consistency throughout the source code, keep these rules in mind as you are working: + +* All features or bug fixes **must be tested** by one or more unit tests. +* All public API methods **must be documented** with XML documentation. + +## Git Commit Guidelines + +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type** and a **subject**: + +``` +: + + +