Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@veritas-vos-liberabit.com>2013-01-22 12:23:48 +0400
committerAtsushi Eno <atsushieno@veritas-vos-liberabit.com>2013-01-22 12:23:48 +0400
commit8911e1d3f169a0e378b4e237926269d9218c8fd3 (patch)
treea289bfd5226af1cbee01b55fa8c1eec4c4ab204c
parent8f45b386f24fd824a7db294e3e6b805ac260fef2 (diff)
prepare for new directory structure introduced at 2b5dbddd740b in original rx.
-rw-r--r--README.md33
-rw-r--r--mono.patch15
-rw-r--r--replacer.sh24
3 files changed, 69 insertions, 3 deletions
diff --git a/README.md b/README.md
index 7d86f69..0645df7 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,6 @@
+About this source repository
+----------------------------
+
This is a partial import of rx.codeplex.com for mono.
Since rx.codeplex.com is massive and we only need partial source tree of it
@@ -5,12 +8,36 @@ Since rx.codeplex.com is massive and we only need partial source tree of it
repository for mono submodule.
This tree is hence manually imported. Though it is somewhat easy to maintain:
-we can cherry-pick changes only in Rx.NET in the rx.codeplex.com.
-Mostly we would not need to copy sources from the original treemanually,
-but sometimes we do when a checkout involves other directories than Rx.NET.
+we try to "cherry-pick" [*2] changes that are applied only to Rx.NET in the
+rx.codeplex.com.
+Mostly we would not need to copy sources from the original tree manually,
+but sometimes we will do so when a checkout involves other directories
+than Rx/NET.
+
+(Actually we had to sort of revamp the cherry-pick model when there was
+folder structural change in the Microsoft repository. But the structure
+is simpler than before and we will likely need less manual imports.)
For every original release, we should import the updates and commit to
this master, then create a branch for each release and *then* apply our
local changes (which is minimum but required) to the branch.
[*1] http://codeplex.codeplex.com/workitem/26133
+[*2] not really meaning git cherry-pick which won't apply, but rather
+ applying diffs to the tree.
+
+Source changes
+--------------
+
+As of OSS release 1.0, there are only two steps are required to make it
+possible to build with mono in the source repo:
+
+- apply mono.patch
+- cd Rx/NET/Source/Tests.System.Reactive and run ../../../../replacer.sh
+
+Actually ObservableExTest.cs cannot be compiled due to insufficient
+type inference for lambdas, so I skipped it in Mono.Reactive.Testing_test.dll.
+
+Note that the actual class library build is done in mono/mcs/class and
+there is a build script that generates required source list etc.
+
diff --git a/mono.patch b/mono.patch
new file mode 100644
index 0000000..4b45349
--- /dev/null
+++ b/mono.patch
@@ -0,0 +1,15 @@
+diff --git a/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs b/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs
+index e9715a4..86cd62e 100644
+--- a/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs
++++ b/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs
+@@ -8,7 +8,9 @@
+ using System.Reactive.Disposables;
+ using System.Reactive.Linq;
+
+-#if WINDOWS8
++#if NUNIT
++using NUnit.Framework;
++#elif WINDOWS8
+ using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
+ #else
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
diff --git a/replacer.sh b/replacer.sh
new file mode 100644
index 0000000..bcc15c1
--- /dev/null
+++ b/replacer.sh
@@ -0,0 +1,24 @@
+using System.IO;
+using System.Text;
+
+foreach (var file in Directory.GetFiles (".", "*.cs", SearchOption.AllDirectories)) {
+ var text = File.ReadAllText (file);
+ if (text.Contains ("#if NUNIT"))
+ continue;
+ Console.Error.WriteLine (file + " : " + text.Contains ("using Microsoft.VisualStudio.TestTools.UnitTesting;"));
+ text = text.Replace (
+"using Microsoft.VisualStudio.TestTools.UnitTesting;",
+@"#if NUNIT
+using NUnit.Framework;
+using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
+using TestMethodAttribute = NUnit.Framework.TestAttribute;
+using TestInitializeAttribute = NUnit.Framework.SetUpAttribute;
+#else
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+#endif".Replace ("\n", "\r\n"));
+
+ text = text.Replace ("[Timeout", "//[Timeout"); // no TimeoutAttribute in NUnit.
+
+ using (var tw = new StreamWriter (file, false, new UTF8Encoding (true, true)))
+ tw.Write (text);
+}