Skip to content

Conversation

Fijo
Copy link
Contributor

@Fijo Fijo commented Oct 30, 2021

Motivation:

I'm currently attempting to create a lightweight extension on top of System.Reactive for use with the latest version 2021.2 of the Unity Game engine. The existing adoption of System.Reactive for Unity called UniRx has lacked maintenance in a big way for years hence a growing community interest in the ability to benefit from the improvements made to System.Reactive in recent years.
To validate the correct operation of the library System.Reactive when used with Unities unique features like IL2CPP which is required to support builds onto various platforms, I'm using the existing Tests existing in this repository.
I having an automated continues integration setup which is making use of the tests as they are in this repository to continuously validate each new version of System.Reactive for its use in unity.

Discovery:

Running the tests in PrivateTypesTest.cs I ran into issues when using an ahead of time compilation (IL2CPP) as because of the heavy use of reflection the compiler wasn't able to figure out which generic types it had to generate for their use at runtime.

Reason for creating this PR:

Reading through EitherBase as well as Either<,> and it's nested classes (all nested within PrivateTypesTest) I was faced with some confusing, until I realized the exactly, what's being attempted to accomplish there. I wanted to make it a little easier for others to understand this.

Solution:

To archive this I reduced to use of reflection which lead to typing being clearer when reading the code.
This incidentally ended up also fixed my ahead of time compilation issues.

Fijo added a commit to Cosmic-Shores/Rx.Unity that referenced this pull request Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant