| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…age's native function support * Only hooked up to rxjava-groovy in this commit
* Adds an Object overload to Observable methods via code generation
…to version_0.10.0_multi-static Conflicts: rxjava-core/src/main/java/rx/Observable.java
I couldn't get these to work once we removed the Object overloads that was apparently being invoked instead of the staticly typed method so removing them. If someone else can get these generics working then please submit a new pull request.
These methods will need different names as they have the same argument count so break with dynamic overloads once we do static handling of dynamic languages.
- needed for Scala build to succeed
|
RxJava-pull-requests #174 SUCCESS |
Sorry, something went wrong.
|
Sorry, something went wrong.
|
Looks good, all in all. I'll try this out with my Scala sample as soon as possible. Thanks for the awesome work! |
Sorry, something went wrong.
|
Thanks @jmhofer for stepping in to test out these changes. @mattrjacobs Answers to your questions ...
If we leave the Map<String, Object> then the Functions.from capability needs to keep working. The other option is we change that to be Map<String, Function> as you suggest and then auto-generate the versions for each language.
I think the simplest solution is just not have any "compile" dependencies, only "provided". I believe your Gradle scripts just need to adjust to include provided dependencies, not just compile runtime dependencies and then it will work. I would not try messing with POM files directly. If something is specified as "provided" then it is used for compilation but not included in the POM when pushed to Maven Central. |
Sorry, something went wrong.
|
RxJava-pull-requests #175 SUCCESS |
Sorry, something went wrong.
|
RxJava-pull-requests #176 FAILURE |
Sorry, something went wrong.
|
RxJava-pull-requests #177 SUCCESS |
Sorry, something went wrong.
|
Currently, if you publish RxJava to your local Maven repo, you'll find that the rxjava-scala and rxjava-swing POMs include a dependency on "rxjava-core", which doesn't exist anymore as a module, as it was renamed to "rxjava". Unfortunately, I don't know enough about Gradle to be able to fix this. My guess would be that it's not enough to set the baseName of the JAR to just "rxjava". There should be a way to tell gradle that the module is called "rxjava" even though the directory is called "rxjava-core". |
Sorry, something went wrong.
|
Here's another problem: Excluding "*$UnitTest" from JARs that might be included by Scala will cause the Scala compiler to crash with a Typer error because it expects defined inner classes to exist. This means that at least in rxjava-swing, the exclude can't be done. |
Sorry, something went wrong.
|
I've created a mini-PR against the unit test problem here: benjchristensen#1 |
Sorry, something went wrong.
|
I got my little sample (https://github.com/jmhofer/rxjava-samples) working with this PR. The code itself was very easy to adapt. The implicits seem to be working fine. One small thing I noticed: The very long names of the implicits are a bit distracting, imho. Should I want to use one of these functions explicitly, I'd prefer shorter names like simply func1 instead of scalaFunction1ToRxFunc1, for example. |
Sorry, something went wrong.
|
Responses to @jmhofer:
|
Sorry, something went wrong.
|
@mattrjacobs: All your suggestions seem sensible to me. Concerning implicit naming: It may be relatively rare, however using the implicits often leads to your having to specify the parameter types of the closures being implicitely converted, which can be more verbose and confusing than making the conversion explicit and then being able to shorten the closure syntax. Names like toRxFunc1 are ok with me, not too long and still unambiguous, sounds like a good compromise. |
Sorry, something went wrong.
|
RxJava-pull-requests #181 SUCCESS |
Sorry, something went wrong.
|
RxJava-pull-requests #182 SUCCESS |
Sorry, something went wrong.
|
RxJava-pull-requests #183 SUCCESS |
Sorry, something went wrong.
|
RxJava-pull-requests #188 FAILURE |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Manual merge of pull #300 from @mattrjacobs
This will make RxJava completely static by removing all Object overloads (see #208 and #204).
I'm submitting this before it being 100% ready so people can review and provide feedback.
Open items to append to this pull request before merging:
1) subscribe with map is not handled yet
The following signature needs to be made static. Right now the lack of this combined with removal of Functions.from dynamic language functionality has broken this.
2) Core artifact naming convention
Should rxjava-core-x.y.x.jar become rxjava-x.y.z.jar since the concept of core+language no longer applies?
I think I'd prefer this:
Only one of those jars is needed hence the reason why I think the 'core' term is no longer needed as it communicated the fact it was always needed.
Any contrib modules would be: rxjava-contrib-module-name-x.y.x.jar
3) Dependencies from languages to core still exist
The build still will result in Maven Central POM files requires rxjava-core from the language version despite that not being the case. Need to eliminate this dependency in the artifact.
Implementation notes originally posted at #204 (comment):
After implementing and throwing away a few different approaches we have landed on a solution we feel will balance the various competing priorities.
Our goals are:
The solution we have arrived at will work as follows:
For example:
The default Java version:
A Groovy version:
A project will include just the jar that meets their language needs, there will no longer be a "core" jar plus the language adaptor.
The drawback of this is that mixing two of these in a classpath will result in non-deterministic loading (whichever is loaded last wins) and that is the version that will be used. This means if a library depends on rxjava.jar but is using Groovy and needs rxjava-groovy.jar it is up to the developer of that project to make sure they have only the rxjava-groovy.jar version. This is not ideal but is a one-time pain setting up a build and is better than the constant pain of missing static typing or converting to/from different Observable implementations for different languages.
This should not break any code but will require a slight change to the build dependencies in your project when we release this.
We hope that this enables the RxJava project to better achieve its goal of being polyglot and targeting the JVM in general and not any specific languages without sacrificing interop or idiomatic usage in each of the languages.