These are chat archives for ensime/ensime-atom

27th
Aug 2016
Rob Norris
@tpolecat
Aug 27 2016 06:49
I just tried to set up ensime with atom. I had to restart atom to see the settings button for the ensime package after installing, and after starting ensime (it said it connected) I command-clicked on an identifier and it said ensime was not started.
Is there any documentation what commands are provided? I can't seem to find any usage information on the ensime website.
"Browse doc" results in Uncaught TypeError: Cannot read property 'httpPort' of undefined
Rob Norris
@tpolecat
Aug 27 2016 06:56
Trying to start ensime when it is already started results in no .ensime file found
Otherwise the ensime commands do nothing.
Please at-mention me if anyone has suggestions; i'm not subscribed to this channel.
Rob Norris
@tpolecat
Aug 27 2016 07:09
server.log of the above.
Rob Norris
@tpolecat
Aug 27 2016 15:35
@fommil ^
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 15:41
:clap: but i need to defer to the atom experts as i have no clue. I trust you followed the ensime.org instructions and troubleshooting guide @tpolecat ?
Rob Norris
@tpolecat
Aug 27 2016 15:45
It was a new setup and had never worked before so it didn't seem to apply.
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 15:45
Did you try this on a project that is on github?
Rob Norris
@tpolecat
Aug 27 2016 15:46
Yeah tpolecat/cofree. It has two source files.
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 15:46
@tpolecat is definitely worth working through the troubleshooting guide. It solves 90%+ problems
Rob Norris
@tpolecat
Aug 27 2016 15:47
Ok
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 15:47
Although they probably all need to be updated with a flow chart depending on the kind of problem. Nuking the server jars in less relevant for atom because they use coursier
Rob Norris
@tpolecat
Aug 27 2016 15:49
As a general note some accounting of what ensime does and how to make the editor do it would be helpful. The closest thing I saw on the site was the compatibility matrix.
Rob Norris
@tpolecat
Aug 27 2016 16:04
Deleted everything and then did ensime:start and the "Ensime Server Upgrade" tab says ```
This message was deleted

/Users/rnorris/.coursier/cache/v1/https/repo1.maven.org/maven2/org/ow2/asm/asm/5.1/asm-5.1.jar /Users/rnorris/.coursier/cache/v1/https/repo1.maven.org/maven2/org/ensime/monkeys_2.11/1.0.0/monkeys_2.11-1.0.0.jar /Users/rnorris/.coursier/cache/v1/https/repo1.maven.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jar /Users/rnorris/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.11/1.0.4/scala-xml_2.11-1.0.4.jar /Users/rnorris/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-debugger/scala-debugger-macros_2.11/1.1.0-M2/scala-debugger-macros_2.11-1.1.0-M2.jar ... [more jars]
Nothing else happens.
Ensime start does nothing now.
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 16:56
@tpolecat did you not click through to the Atom instructions? http://ensime.github.io/editors/atom/
I'll have a look at your project from Emacs sometime in the next few days
Rob Norris
@tpolecat
Aug 27 2016 16:56
Yes, I read every word.
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 16:57
docs for Atom look like something where we are looking for volunteers. When I've watched people use it, the options are usually pretty clear in the drop down menu but I'm not an Atom user
but it sounds like you didn't get the server working, so nothing is going to work
Rob Norris
@tpolecat
Aug 27 2016 16:58
The server appears to be running and getting messages.
Blah. Anyway, thanks. I'll check back later.
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 16:58
ok, if it's running then what is not working for you?
can you get completions at point? type at point?
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:05
@tpolecat I answered in ticket. Basically, there's no source-roots in your .ensime. I believe this is a bug in your project or ensime-sbt, but @fommil - correct me if I'm mis-using source-roots when using them to find the ensime server connection of a file (to support multiple ensime's running in one atom workspace)
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:05
I'll respond in ensime/ensime-atom#249
I'm not going to try with sbt 0.13.8... it's going to take my all night to download it
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:07
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:07
oh, this is a "script style" scala project? Yeah, we don't support those
so many many hacks needed
just move to maven style and all is good
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:08
Hm, but isn't there a way to just look at sourceRoots?
of sbt project I mean?
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:08
cofree depends on scala-actors? Hmm, lovely.
@hedefalk hmm, for script style projects it's so much work to support non-recursive directories that are parents of non-source directories
it's not something I'm personally interested in putting my time into until somebody pays me to work on a project that works like that and also says they won't pay me anymore if I change it to maven style
so the workaround is the no. 1 server FAQ https://github.com/ensime/ensime-server/issues?q=label%3AFAQ
(which proves that @tpolecat didn't read every word :-P)
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:12
Sorry, I'm a bit confused by the terminology. Script style, what does that mean? Maven-style, that's just "src/main/scala" or something else?
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:12
ensime/ensime-server#1432
I could pad this out some time with more detail if people want it, it would be good if somebody sent a PR but honestly this is soooo fiddly
probably the best thing to do would be to emit a warning in sbt-ensime
I'll raise a ticket for that!
ensime/ensime-sbt#219
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:14
But I was under the impression that sbt just had a list of sourceDirectories of the project, so can't ensime-sbt just look there? Or is this nothing to do with ensime-sbt really but with ensime-server?
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:14
the server and clients
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:14
ensime-atom wouldn't have any problems :)
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:14
the thing is that the root directory is "special"... it's non recursive
you sure about that?
what do you do if somebody edits project/Build.scala?
it's under the root directory that you just got told was part of the build
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:15
Oh.
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:15
exactly
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:15
:)
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:15
when stuff impacts the client AND the server, it tends to be far too complicated to fix
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:15
I'm gonna stick with src/main/scala :)
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:16
so I always opt for KISS and say "sorry, ensime is not for you..."
unless they send a PR
@tpolecat some explanation here for you ^^^
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:16
But does sbt in-itself have the notion of non-recursive sourceDirectories or is it hacketihack there?
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:16
oh this is special cased in sbt, yes
there is a name for it, I can't recall what it is. sourcesInRoot I think
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:17
Ok… Well. Someday. I think it should be supported, but I have like thousand things I would wanna do before…
You think that ensime-sbt validation will be a quickie? I could probably have a validation of .ensime that links to that ticket if source-roots nil client side otherwise…
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 19:39
yeah, I think validation and a description of the workaround would be good
oh, that reminds me the coursier message should be better
Viktor Hedefalk
@hedefalk
Aug 27 2016 19:58
@kelf I think there might be a plugin somewhere or someone should write it. Dirty quick fix might be to ln -s /src/main/scala/myorg to just main or something but of course won't work when code browsing… I think it's ok since atom/tree-view#640 so I haven't bothered much. Don't use the tree-view that much actually.
Oh, sorry, that was what you asked about. There's a setting in tree-view:
Screen Shot 2016-08-27 at 21.59.41.png
Screen Shot 2016-08-27 at 21.59.57.png
Screen Shot 2016-08-27 at 22.00.22.png
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 20:49
I like the colours
Rob Norris
@tpolecat
Aug 27 2016 20:53
@fommil doesn't depend on scala-actors
Rob Norris
@tpolecat
Aug 27 2016 21:12
Ok it's working better for a project that doesn't have source at the top.
How can I get ensime to understand kind-projector?
And all my compiler flags?
Rob Norris
@tpolecat
Aug 27 2016 21:28
Tons of false positives in tpolecat/atto if you want to try it.
I'm giving up. Thanks.
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 21:56
@tpolecat scala-actors is a transitive dep fo
for that project
Got a file / line for a false positive it atto?
Rob Norris
@tpolecat
Aug 27 2016 22:15
@fommil Combinator.scala and elsewhere ... unused imports
Wonder why scala-actors is getting pulled in. That's weird.
> libraryDependencies
[info] List(org.scala-lang:scala-library:2.11.8, org.scala-lang:scala-compiler:2.11.8:ensime-internal, org.scala-lang:scala-library:2.11.8:ensime-internal, org.scala-lang:scala-reflect:2.11.8:ensime-internal, org.scala-lang:scalap:2.11.8:ensime-internal, org.tpolecat:doobie-core:0.2.4, org.tpolecat:doobie-contrib-h2:0.2.4, org.tpolecat:atto-core:0.4.2, org.spire-math:kind-projector:0.7.1:plugin->default(compile), org.tpolecat:tut-core:0.4.3:test)
I'm not seeing it. Nor in tut, which it uses.
Where did you see it?
Not in the .ensime file.
Anyway the false positives for unused imports seem to come and go. Remove one and sometimes they all go away, then they come back.
Ghost
@ghost~540393fe163965c9bc2018ce
Aug 27 2016 23:21
Are you using 2.11.8? There was a known issue in order versions of scala. I seen scala actors being downloaded, it might have been in the sbt build but I'm pretty sure it was scala 2.11