Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static core #323

Merged
merged 26 commits into from
Aug 30, 2013
Merged

Static core #323

merged 26 commits into from
Aug 30, 2013

Conversation

mattrjacobs
Copy link
Contributor

Another take on Issues #204, #208.

  • typesafe rxjava-core
  • modular jars
  • Scala support via implicits
  • Groovy support via extension methods
  • No Clojure support in this PR (eventually via macros)
  • Eliminated JRuby support (for now)

mattrjacobs and others added 21 commits August 27, 2013 10:46
Conflicts:
	rxjava-core/src/main/java/rx/Observable.java
	rxjava-core/src/main/java/rx/observables/BlockingObservable.java
	rxjava-core/src/main/java/rx/subjects/PublishSubject.java
This adds support for the Groovy closure by adding extension methods that overload Action/Function.
- remove static methods that are not entry points (creators or combinatorial)
- remove deprecated methods

This change was done to:

- Reduce the footprint of the API
- Clarify the API so instance methods are preferred unless the static method is appropriate as an entry point
- Remove duplicate method signatures (such as a buffer method) where the only difference was one was static. This actually causes issues at the bytecode level with dynamic languages since the only difference between them is a modifier making one of them static. Some dynamic languages have a hard time choosing between the two methods when both have the same signature.
The Observable class is huge by nature as it is the facade for all operators. Due to this it represents all functionality and should not have it's tests inside it. They are moved to /src/test/ so as to allow breaking them up into lots of individual classes.
Reactivate core tests and combineLatest
@cloudbees-pull-request-builder

RxJava-pull-requests #205 FAILURE
Looks like there's a problem with this pull request

@benjchristensen benjchristensen mentioned this pull request Aug 29, 2013
@benjchristensen
Copy link
Member

@jmhofer @mttkay If either of you use Scala (and of course anyone else using Scala), can you build the rxjava-scala module and try this out?

I would appreciate your feedback as this is a pretty major refactoring and key step towards getting to version 1.0.

@jmhofer
Copy link
Contributor

jmhofer commented Aug 29, 2013

Sure, I'll try this out asap.

@jmhofer
Copy link
Contributor

jmhofer commented Aug 29, 2013

Updating my rxjava-samples project to this worked fine.

benjchristensen and others added 3 commits August 29, 2013 13:13
We considered it being <String, Action> but that is also awkward as it's not a real functional interface.
Also because of type erasure extension methods aren't super helpful here as Map<String, Action> collides with Map<String, Closure>
Remove subscribe(Map<String, Object>) and cleanup Functions.from
@benjchristensen
Copy link
Member

Thank you @jmhofer for confirming Scala functionality.

@cloudbees-pull-request-builder

RxJava-pull-requests #206 FAILURE
Looks like there's a problem with this pull request

@benjchristensen
Copy link
Member

If anyone watching this project uses RxJava with Groovy, please build from this branch and test.

@benjchristensen
Copy link
Member

Current status of this pull request is:

  • Java core is fully type safe (removed object overloads)
  • Java core has a reduced API surface area (removed duplicative and deprecated methods)
  • Scala is functional using implicits
  • Groovy is functional using an extension module
  • Clojure is awaiting a new macro that will allow rx/fn syntax for passing closures
  • JRuby support is dropped for now (apparently it hasn't been working). If anyone from the JRuby community can get involved to help we'd gladly accept the assistance to get it fully supported again.

daveray and others added 2 commits August 29, 2013 22:57
Added rx.lang.clojure.interop namespace with fn and action macros.
Updated examples.
Updated README.
@cloudbees-pull-request-builder

RxJava-pull-requests #207 FAILURE
Looks like there's a problem with this pull request

@mttkay
Copy link
Contributor

mttkay commented Aug 30, 2013

We use some Scala on the server side, where we use Finagle and Twitter Futures (not RxJava), but I could test in a sandbox project if that helps. I will be travelling for 2 weeks starting Monday, but I'll try to find some time over the weekend!

@benjchristensen
Copy link
Member

Thanks @mttkay Don't stress if you don't have time over the weekend, we've had enough confirmation of Scala functionality to move forward. Enjoy your trip!

@benjchristensen
Copy link
Member

Thank you @daveray for the Clojure adaptor.

I think we are getting close to this pull request being ready to merge into master... just some final testing.

If anyone has final feedback before we move forward now is the time.

@benjchristensen
Copy link
Member

Merging to master for final testing and release.

benjchristensen added a commit that referenced this pull request Aug 30, 2013
@benjchristensen benjchristensen merged commit 84696e0 into ReactiveX:master Aug 30, 2013
rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
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.

6 participants