These are chat archives for ensime/ensime-atom

24th
Feb 2016
Magnus Andersson
@magnusart
Feb 24 2016 12:27
Hi, I tried out Atom with ensime and got it running but it looks like debugging is still missing. What is the status for that?
Viktor Hedefalk
@hedefalk
Feb 24 2016 12:28
Non-existing as of yet.
Magnus Andersson
@magnusart
Feb 24 2016 12:29
OK nothing in the pipe as far as you know?
Viktor Hedefalk
@hedefalk
Feb 24 2016 12:31
I haven't explored much and I think the debugging is so so backend wise. But should be pretty straight forward to implement in Atom. I'm not doing any debugging myself these days so haven't put any prio on this. When the todo-list get sparse I'll build it of noone beats me to it. But currently there are other things that are higher on my list.
Magnus Andersson
@magnusart
Feb 24 2016 12:34
OK. I miss debugging a lot working away from IntelliJ or Eclipse. The other stuff I don’t miss much at all, as long as I have the library source code available. Many times I need to look into code I didn’t write myself or reproduce an issue by sending in a request and see where it goes wrong.
Perhaps I should give debugging a look. But it looks like have a a lot of reading to do before that.
Viktor Hedefalk
@hedefalk
Feb 24 2016 12:34

Check status on Emacs here: http://ensime.github.io/editors/emacs/debugging/

I guess we could imitate this pretty quickly. We should be able to persist breakpoints too: https://discuss.atom.io/t/saving-package-specific-data-on-project/25607

Magnus Andersson
@magnusart
Feb 24 2016 12:39
I’ve seen the debugging in Sublime. Basically you wish to show the stack and all breakpoints. Having breakpoint expressions would be nice as well but not the first thing you need to do.
But I guess the big deal is to look at the protocol and then also learn how to hack Atom
Viktor Hedefalk
@hedefalk
Feb 24 2016 12:40

I very seldom debug nowadays, if I have problems I try to reproduce by tests instead. But I actually did debug ensime-server in Eclipse a few weeks ago to try to understand some things though. scala-compiler is probably the worst looking Scala code I've seen so there debugging was needed. :)

There's probably a lot of UI work to make debugging in Atom as good as Eclipse too. I think the stack rewriting smartness of scala-ide isn't in ensime either…

Magnus Andersson
@magnusart
Feb 24 2016 12:45
I basically agree around not having to debug often when it comes to projects where I have control over the code. Other times I find it a good exploratory tool, mostly when working with scala professionally when I need to get into a problem quickly.
But yes, the UI will be tricky. I wonder if any other projects have solved the debugging UI in Atom.
Viktor Hedefalk
@hedefalk
Feb 24 2016 12:51
Not many have I think. ide-haskell hasn't, there's https://atom.io/packages/node-debugger that one could look into. There's a typescript ide too…
They seem to have something: https://atom.io/packages/atom-typescript
Magnus Andersson
@magnusart
Feb 24 2016 12:53
Hmm… let’s get back to this topic. I’ll try to do some research. Have to go into a meeting.
Viktor Hedefalk
@hedefalk
Feb 24 2016 12:53
I'm actually thinking it would be time to expore vscode for me before starting debugging support in Atom: https://code.visualstudio.com/docs/extensions/example-debuggers
Ghost
@ghost~540393fe163965c9bc2018ce
Feb 24 2016 13:00
I recommend waiting for chip's debugger rewrite before embarking on debugging support in the clients
Viktor Hedefalk
@hedefalk
Feb 24 2016 13:01
@fommil Ok, cool!
Gerjan
@GerjanOnline
Feb 24 2016 14:33
i am trying Ensime on Atom but it gives all sorts of errors while sbt compiles just fine...
do I have a wrong setup or something?
or value seconds is not a member of Int Note: implicit value timeout is not applicable here because it comes after the application point and it lacks an explicit result typeat line 16 col 36 Error could not find implicit value for parameter timeout: akka.util.Timeoutat line 44 col 45 Error not enough arguments for method ?: (implicit timeout: akka.util.Timeout, implicit sender: akka.actor.ActorRef)scala.concurrent.Future[Any]. Unspecified value parameter timeout.at line 44 col 45
blob
so mostly implicits and postfixOps, sbt does not give me these errors and warnings, somebody know why?
TL;DR, if you can upgrade to scala 2.11.8-SNAPSHOT, those errors are fixed in upstream presentation compiler.
Gerjan
@GerjanOnline
Feb 24 2016 14:46
ah thanks!!
Viktor Hedefalk
@hedefalk
Feb 24 2016 14:47
np
Gerjan
@GerjanOnline
Feb 24 2016 14:47
so just set the scalaVersion to 2.11.8-SNAPSHOT?
in build.sbt...
Viktor Hedefalk
@hedefalk
Feb 24 2016 14:48
You can also disable auto-marking of implicits in Atom (will remove the blue squiggles), clean of an restart. It is apparently a bug triggered by asking pres. compiler about implicits.
So not doing that will make the issue go away I think.
Channing Walton
@channingwalton
Feb 24 2016 14:50
Hello. is there an ensime-emacs gitter or can I ask my emacs questions here?
Viktor Hedefalk
@hedefalk
Feb 24 2016 14:50
Magnus Andersson
@magnusart
Feb 24 2016 14:50
@fommil About debugging rewrite. Is there an issue or similar where I can track the work and the progress for ensime-server?
Channing Walton
@channingwalton
Feb 24 2016 14:50
I am an idiot. Sorry.
Viktor Hedefalk
@hedefalk
Feb 24 2016 14:51
@channingwalton we're all idiots.
Channing Walton
@channingwalton
Feb 24 2016 14:51
:D
Ghost
@ghost~540393fe163965c9bc2018ce
Feb 24 2016 15:17
@magnusart probably, I'm not close to it. It has its own repo, ask on there maybe
@chipsenbeil ^^^
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:30
Magnus Andersson
@magnusart
Feb 24 2016 15:31
I get errors on Atom with the same project (akka-persistence-cassandra) I had issues with on Sublime. So I think there is something going on in the ensime-server side. The logs I can see in Atom says
All files seen. Starting client
connecting on port: 55235
["changed from ", Object, " to ", Object]
client connected
["changed from ", Object, " to ", Object]
client.coffee:68 Ensime server error event: Error: This socket is closed.
I get this with two projects (one OSS and one proprietary).
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:34
"This socket is closed." Oh, seems your server is not answering on the port, maybe dead?
Magnus Andersson
@magnusart
Feb 24 2016 15:34
I’ve cleaned out ensime files and run gen-ensime several times (or gen-ensime-project)
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:34
Check your [project]/.ensime_cache/server.log
Magnus Andersson
@magnusart
Feb 24 2016 15:34
Will do
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:35
You cannot run the same server serving two client by the way, maybe that's it?
Magnus Andersson
@magnusart
Feb 24 2016 15:35
Oh, didn’t know that.
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:35
I think if a second client is trying to connect on the same port, shit happens.
Magnus Andersson
@magnusart
Feb 24 2016 15:36
I have tested without multiple projects at the same time. But I’ll give it another try
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:37
Yeah, I don't know if it's architectural and not possible or just reasons… @fommil Is it impossible to run two clients against same ensime-server?
Magnus Andersson
@magnusart
Feb 24 2016 15:44
Now I only have one instance. I get ["changed from ", undefined, " to ", undefined] when I change to a scala file
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:44
That means you have no client at all.
You need to run ensime:sart
ensime:start
Magnus Andersson
@magnusart
Feb 24 2016 15:44
I did.
Hmm...
connecting on port: 55392
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:45
Did you check the server log?
Magnus Andersson
@magnusart
Feb 24 2016 15:46
Yes. Just debug messages
DEBUG None o.e.i.SearchService - indexing file:///...
These are the four last lines
16:27:31.916 DEBUG akka://ENSIME/user/ensime-main/project/scalac o.e.c.Analyzer - received handled message FullTypeCheckCompleteEvent in state startup
16:28:36.245 DEBUG None o.e.i.SearchService - committing index to disk...
16:28:36.486 DEBUG None o.e.i.SearchService - ...done committing index
16:28:36.489 DEBUG akka://ENSIME/user/ensime-main/project o.e.c.Project - created 229459 and removed 0 searchable rows
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:46
Long time ago…?
ps ax | grep ensime
Magnus Andersson
@magnusart
Feb 24 2016 15:47
Is running
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:47
Ok. And if you do ensime:start in atom you just see connecting on port: 55392
No incoming messages?
Magnus Andersson
@magnusart
Feb 24 2016 15:48
I get an error message that I need to generate an ensime file (but it is already there)
Viktor Hedefalk
@hedefalk
Feb 24 2016 15:48
ensime:stop
then ensime:start again maybe.
If that doesn’t work:
Maybe kill server, [project]/.ensime_cache, reload Atom and try again. Seems you got stuck in some weird state.
Magnus Andersson
@magnusart
Feb 24 2016 15:49
Also get is started something. Trying to copy the message
(in the client)
"isStarted", Array[1]]
0: "isStarted"
1: Array[1]
0: Object
client: Client
destroy: ()
dotEnsime: Object
isSourceOf: (path)
rootDir: "/Users/magnus/Documents/Programmering/Magnusart/akka-persistence-cassandra/project"
statusbarView: StatusbarView[1]
typechecking: Object
addScalaNotes: (msg)
clearScalaNotes: ()
destroy: ()
__proto__: Object
__proto__: Object
length: 1
__proto__: Array[0]
length: 2
__proto__: Array[0]
Stopping ensime now.
No process anymore.
Now it started again and I get this
indexingbridge-RELEASE731.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/lib/tools.jar -Densime.config=/Users/magnus/Documents/Programmering/Magnusart/akka-persistence-cassandra/project/.ensime -Densime.protocol=jerk org.ensime.server.Server
ensime-startup.coffee:87 Seen:  /Users/magnus/Documents/Programmering/Magnusart/akka-persistence-cassandra/project/.ensime_cache/http
ensime-startup.coffee:82 starting watching for: /Users/magnus/Documents/Programmering/Magnusart/akka-persistence-cassandra/project/.ensime_cache/port
ensime-startup.coffee:87 Seen:  /Users/magnus/Documents/Programmering/Magnusart/akka-persistence-cassandra/project/.ensime_cache/port
ensime-startup.coffee:90 All files seen. Starting client
client.coffee:44 connecting on port: 55476
ensime.coffee:157 ["changed from ", Object, " to ", Object]
client.coffee:46 client connected
ensime.coffee:157 ["changed from ", Object, " to ", undefined]
The last line is when I switch to the scala file.
This is with0.4.1-SNAPSHOT
sever.log does not update
Magnus Andersson
@magnusart
Feb 24 2016 15:57
Now I got something. I switched back to version 0.4.0
16:56:07.981 ERROR akka://ENSIME/user/ensime-main/tcp-server/con1 o.e.s.t.TCPConnectionActor - Error seen during message processing, closing client connection
java.lang.StackOverflowError: null
    at org.ensime.jerk.JerkConversions$fresh$macro$502$1.inst$macro$499$lzycompute(JerkFormats.scala:46) ~[jerky_2.11.jar:0.9.10-SNAPSHOT]
    at org.ensime.jerk.JerkConversions$fresh$macro$502$1.inst$macro$499(JerkFormats.scala:46) ~[jerky_2.11.jar:0.9.10-SNAPSHOT]
    at org.ensime.jerk.JerkConversions$fresh$macro$502$1.inst$macro$499$lzycompute(JerkFormats.scala:46) ~[jerky_2.11.jar:0.9.10-SNAPSHOT]
goes one for about 1000 lines
In the client I get Ensime server error event: Error: read ECONNRESET
Maybe I should move this to ensime server instead.
@fommil where should I post above? Couldn’t find a gitter channel on ensime-server github page.
Magnus Andersson
@magnusart
Feb 24 2016 16:04
found it now in gitter.
Viktor Hedefalk
@hedefalk
Feb 24 2016 17:36
0.4.1-SNAPSHOT is referring to what?
not ensime-atom or ensime-server I hope?

Oh, @magnusart . You are running ensime on your meta project. The sbt build project, not the project itself.

watching for: /Users/magnus/Documents/Programmering/Magnusart/akka-persistence-cassandra/project/.ensime_cache/port

And then you move to a ”normal” scala file of which you are not running any ensime instance, which is logged as ”switching from object to undefined” and nothing is shown.

I got a feature request to auto-start without selecting .ensime IFF there is only one that isn’t already started. But I think this might be confusing sometimes.

Magnus Andersson
@magnusart
Feb 24 2016 18:02
@hedefalk that last one was not on the gen-ensime-project but the normal gen-ensime in the root. It was not super clear I realized. That I was trying out different scenarios.
Magnus Andersson
@magnusart
Feb 24 2016 18:14
The macro error was using 0.4.0.
Thing is that it works OK with the same setup in a simple project. So I’m suspecting ensime-server does not like the project for some reason.
Viktor Hedefalk
@hedefalk
Feb 24 2016 19:02
But "/project/.ensime_cache/port" means it's the meta project

/Users/magnus/Documents/Programmering/Magnusart/akka-persistence-cassandra/project/.ensime_cache/portIs the port file of an ensime running for your meta project

/Users/magnus/Documents/Programmering/Magnusart/akka-persistence-cassandra/.ensime_cache/portshould be your actual non-meta project.

Ghost
@ghost~540393fe163965c9bc2018ce
Feb 24 2016 19:16
Actually I got the names wrong, we now call it the project definition. The meta project is in project/project
Magnus Andersson
@magnusart
Feb 24 2016 20:13
@hedefalk I know this might be asking a lot. But I would be very grateful if you could clone the akka/akka-persistence-cassandra, run gen-ensime and then start ensime from Atom and look at the logs. I just wish to know if the issue would reproduce on other machines.
Viktor Hedefalk
@hedefalk
Feb 24 2016 20:27
@magnusart sure thing. not tonight though, but tomorrow.
@magnusart grammis och whiskey nu.
Ghost
@ghost~540393fe163965c9bc2018ce
Feb 24 2016 20:28
whisky* (no 'e')
Magnus Andersson
@magnusart
Feb 24 2016 20:29
@hedefalk Ingen ko på isen så länge rumpan är i land :)
Viktor Hedefalk
@hedefalk
Feb 24 2016 20:35
@fommil Well, tonight I'm actually having Bourbon whiskEy: http://scotchnoob.com/2013/01/21/peach-street-distillers-bourbon/
Ghost
@ghost~540393fe163965c9bc2018ce
Feb 24 2016 20:37
(don't know why the canadian site comes up, http://smws.co.uk should really have a page)
Viktor Hedefalk
@hedefalk
Feb 24 2016 20:47
@fommil good for you!