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
Fix Scala evaluation command #802
Conversation
Awesome work @kaffein!! I’ll try to check this out later today. |
Hmm, when I try to load the
If I
Java version: $ java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode) Which version of java are you on? Also I noticed |
that's weird indeed! I'm still on java 1.8 here :
Should I upgrade java as well ? we can try forcing it to use the most recent version of aleph as you said ... |
Don’t worry about upgrading unless you want to 😄. I sort of accidentally ended up on Java 10. Planning to upgrade to 11 once clojure 1.10 comes out. I can try forcing aleph on my side. |
@kaffein upgrading aleph fixed the issue!! If you add this to ;; overwrite kvlt's outdated version of aleph
[aleph "0.4.6"] |
awesome @devth thanks ... I will add it to the |
474e849
to
035e682
Compare
There it is @devth again thanks |
It works!!! Thanks @kaffein. This is an epic PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 💥
And to answer your question:
Let's leave them hardcoded. If there's ever a need we can extract them out. The only change to yetibot.core would be in the config examples (basically documentation). |
Wouhouuuu \m/ |
hey guys,
Sorry that it took so long to deliver this one but I had some fun (and struggles ^^) learning some new stuff along the way while implementing it ;-)...
by the way, thanks a lot @devth for helping me out when I was stuck : you provided valuable insights ... I owe you a beer (or two hehe)
So, what do we have here :
First of all, instead of using the now deprecated
scalakata
API, we now target the newscastie
Scala evaluation API which uses Server-Sent Events (SSE) for sending back the results.A small utilitiy lib,
[io.nervous/kvlt "0.1.4"]
, has then been introduced to handle these SSEs.kvlt
provides an abstraction based oncore.async
channels for handing out the incoming events from the server.There are some parameters related to the evaluation API (api endpoint url, scala-version etc.) that have been hardcoded. Should I have these parameters set in the config file or is it okay to leave them here? and in the former case, do I have to make a PR to
yetibot.core
for the new set of parameters then?Here are some screenshots of how it renders so far :
Evaluation success with output
Evaluation success without output (no explicit println)
Evaluation errors
There are some stuff that we could improve on :
It can be cool to have some
clojure.specs
validating the data we send/retrieve from the server. I have seen that there are some good stuff that have been implemented onkarma
(good job @jcorrado ^^, I will shamelessly take some inspiration from what you've done ;-)). I will probably add them from another branch as a refinement.We will have to fix the tests as well : they have been disabled since the API deprecation if I'm not wrong. I would like to work on it but since there is already a related issue Fixup the Scala test case #612 , I thought it would be better to work on it from another branch as well.
anyway, feel free to check out this branch and play around with it guys and as usual, do not hesitate to ping me for any suggestions/improvements that you want me to add to this patch.
thanks a lot...