-
Notifications
You must be signed in to change notification settings - Fork 148
update to scala 2.10 #2
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
Comments
Great - 2.10 would be great, but we were worried about our dependency on the REPL. I made the dependency updates I'd like to get off RxJava - likely move to Scala-react once ingoem/scala-react#4 is addressed. |
just got it to compile and it's running 👍 got rid of HackIMain, I will fix it later. I will push on a new branch https://github.com/MasseGuillaume/scala-notebook/tree/scala-2.10.0-update |
Didn't 2.10 remove the ability to interrupt the repl? |
Curious, is there some aspect of RxJava that doesn't work well with Scala (https://github.com/Netflix/RxJava/tree/master/language-adaptors/rxjava-scala) that we should fix? We haven't put any effort thus far into making it "idiomatic" so it relies upon java interop, so I imagine there is a lot that can be improved. |
I'll try to redo some of the work and give you a better answer, but here are some things I recall. Maybe I missed the right way to do these things:
|
This is one of the most important and most commonly used operators in Rx. Take a look at this wiki page: https://github.com/Netflix/RxJava/wiki/Transformative-Operators You can also see the javadoc for the map operator (and many others) here: http://netflix.github.com/RxJava/javadoc/rx/Observable.html
Agreed this isn't ideal, but this is on purpose and a result of us first doing it as an interface internally and it not working because Java lacks extension methods. This was thought on and argued about for a long time after a year of using it internally before opensourcing it. Every Observable needs the dozens of operators implemented so all of them ended up having to always extend of AbstractObservable anyways. The correct way to easily create an Observable is using You can see information on creating Observables here: https://github.com/Netflix/RxJava/wiki/Creation-Operators Some examples:
Unfortunately I don't have a good example in Scala using Observable.create but you'll get the idea from those above. This usage of Observable.create is following the Rx.Net model http://msdn.microsoft.com/en-us/library/hh229096(v=vs.103).aspx
Can you please file a but with the example code (https://github.com/Netflix/RxJava/issues)? We just got a new member of our team who is more experience with Scala than I am and I can get him to help out if you can provide the bug report.
The object type is being used because it allows various different languages to all be supported - such as dynamic languages like JRuby, Clojure and Groovy. You can learn more about how this works here: https://github.com/Netflix/RxJava/tree/master/language-adaptors The use of Object is only ever used in places where a function is expected - a lambda/closure of some type that implements a Func_/Action_ interface. The desire is for a true polyglot system to be capable where Java/Scala/Clojure/JRuby/Groovy/etc can use rx.Observable and pass it around without having conversions from ScalaObservable to ClojureObservable etc. The RxJava library has specifically been written to target the JVM and not a specific language so each language adaptor is supported right from the core library. If you can suggest a better way of allowing various languages to transparently be supported without each of them needing to awkwardly conform to an arbitrary interface rather than just using their various closures/lambas I'd love to hear it. |
Right, thanks. It was actually Observer.map that I was missing, as I'm trying to create an object that both publishes and consumes and can map. However, I can see the reasoning to providing everything on Observable. Let me try using it some more and I'll report back. I do think there are still some problems with the Object thing, but I'll let you know the specifics. |
No operators are ever done on the Observer itself, that is the callback. What you likely want is a Subject as it is both an Observable and Observer. We've only got one Subject so far, but it may give you what you want: http://netflix.github.com/RxJava/javadoc/rx/subjects/Subject.html You can read more about subjects here: http://msdn.microsoft.com/en-us/library/hh242970(v=vs.103).aspx Github issue for the implementation of the rest: ReactiveX/RxJava#17 |
Here's the discussion on why Object is being used for language adaptors and whether there is a better way of doing it while not breaking the polyglot interop: https://groups.google.com/forum/#!topic/rxjava/bVZoKSsb1-o |
@benjchristensen I'm sorry about the "bad netflix eng." comment in the diagram, sometime with to much time in front of the computer I forgot that their is humans behind those projects :P. @KenCoder I'm a bit stuck with migrating the test to scala 2.10 because of akka. I'm doing a small akka project so I can understand what is going on. @copumpkin yep I saw a thread on google group about it. I will focus on getting the test working then I will see what I can do about this. |
@MasseGuillaume Not a problem. The comments in this thread have helped trigger improvements in RxJava so that's great. The com.google.code.findbugs dependency is now removed as of pull request ReactiveX/RxJava#211 as the usage of the JSR 305 annotations were trivial and not worth the dependency or confusion. Better support of Scala via the use of implicits is very close to be submitted as a new colleague on my team has a lot of experience with Scala. He's providing updates at ReactiveX/RxJava#208 It will be held up from being merged into master until ReactiveX/RxJava#204 is solved which already has a prototype and just needs me or someone else to do the busy work of getting the Gradle build process hooked up. |
What's the status of this ticket? I am eager to use scala-notebook with our map analysis platform (see: github.com/geotrellis/geotrellis) which is currently on 2.10. Is there a pull request that would be helpful at this point? |
@joshmarcus my fork is compiling and working, I'm migrating the test part. |
I'd assume it would help you if the tests actually worked :) or do they for On Thu, Mar 28, 2013 at 7:04 PM, Guillaume Massé
|
@copumpkin well if he just want to try it's working :-). I got the tests to compile https://github.com/MasseGuillaume/scala-notebook/commit/c2b65fa63efcac7e133e2c7a37cd89abbd355a26. It look like the migration broke the repl completion :-(. |
any new update on this? |
Ack, I missed @MasseGuillaume's update on this. I'd love to update to 2.10 but does the completion breakage look fundamental? I expected to lose interruptibility but completion makes me sad. We should probably find a more general way of doing completion anyway, but for now it'd be nice to keep. I'll try tinkering with it a bit. |
I'm sorry, I had my final exams + I'm helping Andrew Phillips & Nermin Serifovic for their talk (Scala Puzzlers Reloaded at Scala Days). I'm rewriting ScalaKata as a service. I will focus when I'm done with my refactor. |
I can take a look at repl completion and see if I can submit a pull request that resolves the issue, if that would be helpful -- or take a look at #5 . |
@MasseGuillaume no problem. I'm looking at your work but am seeing some local conflicts due to other commits updating versions and such. Will keep poking at that. Out of curiosity, why the rename from build.scala to NotebookBuild.scala? @joshmarcus I think we might want to think of a more general approach to completion so it might not be a huge deal if we lose it temporarily. Also, @KenCoder's rework of the back-end might make the failing tests in #5 irrelevant. |
I have a merge of @MasseGuillaume's 2.10 work with @KenCoder's latest back-end design sitting in https://github.com/copumpkin/scala-notebook. No pull request just yet because the tests are still hanging :( but otherwise it seems to work. Still needs some cleanup, too. |
Excellent! I am excited and I will test it out. |
Thanks! I haven't had a chance to give it a decent run-through so it's quite possible I messed something up. |
Just checking in -- any progress on upgrading to 2.10? |
ping @KenCoder. I think they have a 2.10 internally already. |
Yes, I'll work on it this weekend. Ken On Sep 5, 2013, at 10:34 AM, Guillaume Massé [email protected] wrote:
|
So, how soon are going to move to scala 2.10.x and sbt 0.13? |
I've been pretty busy, but will try to spend some more time in the next On Sun, Oct 20, 2013 at 8:41 PM, Anton Kulaga [email protected]:
|
Lovely to see that this would seem to be going ahead. Perhaps there's something half-way working which you can already share? |
Just pushed the branch I'm working on to my repo at https://github.com/KenCoder/scala-notebook-1.git on the scala2.10 branch. Wouldn't describe it as half-way - basically I've upgraded everything (akka, unfiltered, etc) to the latest version and have it compiling. I'm now working through the issues - mostly around the remote actor system stuff. |
Status update - have most unit tests passing, but hitting a strange Akka issue. Works from IntelliJ, but when run from SBT the client actor gets a "Disassociated" message with no explanation and the calc doesn't go through. Banging my head against this now, irrationally thinking about changing to Finagle. Any Akka experts out there? |
@KenCoder same frustration here ! |
Thanks, this was super helpful, especially in locating the SBT 0.13 version On Wed, Nov 27, 2013 at 6:08 PM, Guillaume Massé
|
@KenCoder try |
I know akka -- I could look at the akka issue if it's still pressing. On Tuesday, December 3, 2013, Guillaume Massé wrote:
|
Josh - it would be great if you could look at it. Clone https://github.com/KenCoder/scala-notebook-1 Thanks! On Tue, Dec 3, 2013 at 9:07 AM, Josh Marcus [email protected]:
|
Ken: I was trying to do this, but it is not working for me. It fails trying to download the scrooge-sbt-plugin, for which there apparently is no port to SBT 0.13 yet. Sbt 0.12 won't run for me because of some JLine incompatibility thing, and your instructions say to use SBT 0.13. What am I missing? |
I had pushed some Thrift stuff since i sent the prior email. Can you try On Sat, Dec 21, 2013 at 12:15 PM, windemut [email protected] wrote:
|
There does not appear to be an akka-2.10 branch. I tried the scala2.10 branch again, and this time it started out with SBT set to scala-version = 2.10 (previously it was still set to 2.9.2). But, the issue with scrooge still appears to be there... london:external andreas$ git clone -b scala2.10 https://github.com/KenCoder/scala-notebook-1 I am wondering how it could work for you? Did you compile scrooge yourself? Thanks for looking into this! |
twitter publish everything to https://oss.sonatype.org/content/groups/public/com/twitter/ they did not build scrooge sbt plugin against sbt 0.13. you can use this resolver in plugins.sbt: resolvers += "CodeBrew-io" at http://codebrew-io.github.io/maven/ or build / publish the latest plugin to bintray
|
I pushed akka-2.10 and also fixed the scala-2.10 branch On Sun, Dec 22, 2013 at 10:04 PM, windemut [email protected] wrote:
|
Thanks, Ken! akka-2.10 worked for me. I now get the same error you mention, using sbt. I am afraid I won't be able to help with that. If there is still consideration of change of web framework, I can contribute my 2 cents: I have gone through Play, unfiltered, and now spray. I am partial to spray, for now. It is quite cool once you start to get the Directive thing, and it makes total asynchrony fairly easy. |
Ok, thanks for looking at it, and thanks for the advice. Maybe I'll think On Sat, Dec 28, 2013 at 8:40 PM, windemut [email protected] wrote:
|
So I don't know what a lot of the references in this thread are, but not knowing about any of this work toward 2.10 I idly started porting it based on what's in master and it all seems to work, other than repl interruption (which you could probably recover from the scala repo history.) But I might not be the best judge of how well it works because I'd never looked at it before. In any case, #36. |
...but requires a fix in scalamock more recent than the latest release. |
The ScalaMock dependency problem is fixed in Paul's PR. |
Thanks Paul! |
Fixed curl target for bash script - Update README.md
I'm in a quest to update to scala 2.10
paulp did a huge refactor on the repl ( scala/scala@48cc8b4#src/compiler/scala/tools/nsc )
this is the dependency graph I got from https://github.com/jrudolph/sbt-dependency-graph + dot and the updates I have to make on dependencies. Also I found some bugs on the dependencies like
The text was updated successfully, but these errors were encountered: