These are chat archives for ensime/ensime-atom

11th
May 2016
Jose Narvaez
@goyox86
May 11 2016 12:50
Hello people! I'm using Ensime + Atom but I don't see any autocompletion any ideas?
Michele Sciabarra
@sciabarra
May 11 2016 12:51
did you start the ensime server?
Jose Narvaez
@goyox86
May 11 2016 12:51
Yup @sciabarra
In the atom console it says the autocmplete hook is being executed but I don't see any suggestion in the editor window
Michele Sciabarra
@sciabarra
May 11 2016 12:53
did you configured a .ensime?
added the plugin then ensimeConfig ?
Jose Narvaez
@goyox86
May 11 2016 12:54
yes
Michele Sciabarra
@sciabarra
May 11 2016 12:55
well usually that is enough to see lots of completions
Jose Narvaez
@goyox86
May 11 2016 13:08
:(
Michele Sciabarra
@sciabarra
May 11 2016 13:09
try this
note the branch is using-ensime-and-atom
not the master
git clone -b using-ensime-and-atom https://github.com/sciabarra/ScalaGoodies
bin/install.sh installs everything
bin/atom.sh starts atom
Jose Narvaez
@goyox86
May 11 2016 13:14
@sciabarra Running now
The installer I mean
Michele Sciabarra
@sciabarra
May 11 2016 13:14
yes it downloads everything I prefer a single folder with the needed packages to avoid messing around
Jose Narvaez
@goyox86
May 11 2016 13:15
The scripts need to be run inside the scal;a project or in the ScalaGoodies dir?
Michele Sciabarra
@sciabarra
May 11 2016 13:16
in the scalagoodies
i place the atom packages and the sbt stuff all under project
it is standalone
I just tried downloading from github
it works
on my MacBook
Jose Narvaez
@goyox86
May 11 2016 13:21
The ScalaGoodies?
Michele Sciabarra
@sciabarra
May 11 2016 13:21
I see the completions
just run
bin/install.sh
bin/atom.sh
then Ensime Start
and I see the completions in the Hello.scala
Jose Narvaez
@goyox86
May 11 2016 14:06
It works on the ScalaGoodies dir but not in mine :( I have something missconfigured here heh
The thing is that is my first day ever doing scala LOL
Ghost
@ghost~540393fe163965c9bc2018ce
May 11 2016 14:30
We really need a Learning Scala guide on ensime.org with a dummies guide to setting up ensime.
Everywhere else, we prefer explanation over bullet points, but i think it's ok for beginners.
Jose Narvaez
@goyox86
May 11 2016 14:30

newbie

@sciabarra Now it's working, it was because of my directory layout was not standard an ensime was ignoring it :)
Michele Sciabarra
@sciabarra
May 11 2016 14:32
was my kit useful?
Jose Narvaez
@goyox86
May 11 2016 14:33
@sciabarra Yes looking at your dir structure and the ENSIME output I could fix mine tahsnk so much :)
Michele Sciabarra
@sciabarra
May 11 2016 14:58
(y)
Magnus Andersson
@magnusart
May 11 2016 18:38
"Failed to delete Ensime: Does not exist” say what? (trying to reinstall it)
Michele Sciabarra
@sciabarra
May 11 2016 18:49
did you start it properly?
Magnus Andersson
@magnusart
May 11 2016 18:50
This is the atom package
my atom installation is apparently wonky, I have the package listed but I get above
Michele Sciabarra
@sciabarra
May 11 2016 18:51
what you get when you do Ensime Start ?
Magnus Andersson
@magnusart
May 11 2016 18:51
I get some runtime error, but that is unrelated
Michele Sciabarra
@sciabarra
May 11 2016 18:52
hm if it cannot start i guess this is why it does not exist
Magnus Andersson
@magnusart
May 11 2016 18:54
I think you’re missing the point actually.
Starting and connecting to Ensime server was never the issue
Michele Sciabarra
@sciabarra
May 11 2016 18:55
ok sorry
Magnus Andersson
@magnusart
May 11 2016 18:55
np
anyhow atom restart seems to have resolved it
actually the problem persists:
The error was thrown from the ensime package. ensime is out of date: undefined installed; 0.38.1 latest. Upgrading to the latest version may fix this issue.
Magnus Andersson
@magnusart
May 11 2016 19:02
I just checked my .atom folder an ensime was uninstalled, then I installed again and restarted atom. package list shows ensime 0.38.1 installed
Viktor Hedefalk
@hedefalk
May 11 2016 19:22
@magnusart dead symlink since you dev?
Magnus Andersson
@magnusart
May 11 2016 19:23
Don’t think so.
it is a folder in my .atom dir
Now I killed ensime server manually and it is updating the ensime server. So perhaps there was something wonky going on there because I got an error when trying to find types (which prompted the whole reinstall)
It’s updating now, but crossing my fingers.
Magnus Andersson
@magnusart
May 11 2016 19:34
Same
I get this error
/Users/magnus/.atom/packages/ensime/lib/features/public-symbol-search.coffee:31
TypeError: Cannot read property 'post' of undefined
    at VueComponent.<anonymous> (/Users/magnus/.atom/packages/ensime/lib/features/public-symbol-search.coffee:31:11)
    at Watcher.run (/Users/magnus/.atom/packages/Ensime/node_modules/vue/src/watcher.js:268:17)
    at runBatcherQueue (/Users/magnus/.atom/packages/Ensime/node_modules/vue/src/batcher.js:60:13)
    at Array.flushBatcherQueue (/Users/magnus/.atom/packages/Ensime/node_modules/vue/src/batcher.js:34:3)
    at MutationObserver.nextTickHandler (/Users/magnus/.atom/packages/Ensime/node_modules/vue/src/util/env.js:58:16)
When I type anything in the type search dialog.
It has worked previously for this project so I’m not sure what is going on.
Viktor Hedefalk
@hedefalk
May 11 2016 19:38
Ok, gotta look tomorrow. I'm probably going to do some ensime-atom/ensime-vscode hacking tomorrow for the first time in over a month. https://github.com/ensime/ensime-atom/blob/3d05057fda1ea6b8348cad591f3a5ff0584140b4/lib/features/public-symbol-search.coffee#L31
Magnus Andersson
@magnusart
May 11 2016 19:38
Anyhow, the effect is that the connection to ensime server is lost.
Viktor Hedefalk
@hedefalk
May 11 2016 19:39
Ok. Seems borked :(
Magnus Andersson
@magnusart
May 11 2016 19:39
I’ll clean my caches etc just to make sure it is not something local
Viktor Hedefalk
@hedefalk
May 11 2016 19:39
Seems like there's something broken in ensime-atom there. Crappy code…
Magnus Andersson
@magnusart
May 11 2016 19:39
Would be interesting to see if you can reproduce it.
Viktor Hedefalk
@hedefalk
May 11 2016 19:40
Please open a ticket and I'll look tomorrow!
Magnus Andersson
@magnusart
May 11 2016 19:41
Yep, after testing cleaning out caches. I can’t open a ticket from atom because it thinks I should upgrade to 0.38.1 from ”undefined”. Doh! :P
Viktor Hedefalk
@hedefalk
May 11 2016 19:42
Hm, where is that undefined coming from…?
Open a ticket for that too! :)
Magnus Andersson
@magnusart
May 11 2016 19:42
Not sure, but it is wonky that the package is listed correctly in the package manager
Viktor Hedefalk
@hedefalk
May 11 2016 19:44
My guess for the first issue is that this line is called with undefined client param.https://github.com/ensime/ensime-atom/blob/3d05057fda1ea6b8348cad591f3a5ff0584140b4/lib/features/public-symbol-search.coffee#L14
Oh, do you have an open text editor? Seems I demand this since support for multiple ensime-projects were added: @publicSymbolSearch.toggle(@clientOfActiveTextEditor())
So to know which ensime instance to ask when running multiple projects, it just uses current active text editors parent project. Should probably fix this to always work if only one started ensime instance.
Magnus Andersson
@magnusart
May 11 2016 19:48
Yes I do. But there is (was?) a different bug where I had an unsaved text file with scala code and opened the type dialog
Viktor Hedefalk
@hedefalk
May 11 2016 19:49
So if the file is unsaved and not given any file name that "belongs" to a started ensime instance's source path, it won't find it…
Magnus Andersson
@magnusart
May 11 2016 19:50
yep
Viktor Hedefalk
@hedefalk
May 11 2016 19:50
Was that the case, you think?
Open a bug and I'll fix it so it always works when only one project…
Magnus Andersson
@magnusart
May 11 2016 19:50
Yes, the reason I have an unsaved file is because I’m doing a Scala REPL session and just testing things out
I then try to lookup a type (because I forget myself) and then I get an error.
But this is underlated to the issues above
Viktor Hedefalk
@hedefalk
May 11 2016 19:51
Okej, cool! Great catch then. I'll fix it tomorrow!
Which issues? This is the TypeError: Cannot read property 'post' of undefined issue for search symbol…
Magnus Andersson
@magnusart
May 11 2016 19:53
No this one is different. There is actually already an issue here ensime/ensime-atom#48
Added reproduction instructions to that one.
The original one I cannot reproduce now when I have cleared my cache
Viktor Hedefalk
@hedefalk
May 11 2016 19:57
Ok…
Magnus Andersson
@magnusart
May 11 2016 19:58
To summarize. Three issues
  1. Issue when typing anything in the search for type input. Resolved after clearing ensime-cache so I don’t think you need to look at it
  2. Issue where the exception from 1. stated that atom-ensime version was undefined and I needed to upgrade to 0.38.1. Not able to reproduce now since 1 is resolved. The dialog seems to work now for 3. so I think this is also ”resolved".
  3. Previous issue that sounded like it was related. Issue already exists #48, have upated that one.
Basically I think it was related to the ensime cache is some way or another (but the undefined version is hard to explain that way, but what do I know).
Updated with a stacktrace in #48, as you say it might not be the same issue.