These are chat archives for ensime/ensime-atom

4th
Dec 2015
Matthew de Detrich
@mdedetrich
Dec 04 2015 03:33
@hedefalk This may help in regards to the false positive imports that I am getting, I do use https://github.com/frugalmechanic/fm-sbt-s3-resolver to resolve my dependencies, so I am not sure if that causes issues
Viktor Hedefalk
@hedefalk
Dec 04 2015 08:48
@mdedetrich Unless it makes its mark in .ensime I don’t really think it should matter? It’s still normal jars on your build classpath…?
Arnout Engelen
@raboof
Dec 04 2015 08:54
I'm getting plenty of false positives in https://github.com/xebia/cakemix - most in the /project folder (which is kind of special anyway, though I did run 'sbt gen-ensime-meta') but also it doesn't seem to recognize the '1 second' postfix notation in AskTimeoutProvider
might be a nice project for the Hack Day unless someone beats me to it :).
Not sure whether it's an ensime-atom or ensime-server or 'upstream' problem though, so reluctant to file an issue.
Viktor Hedefalk
@hedefalk
Dec 04 2015 09:00

It’d be cool if someone had the energy to churn out of there’s a difference with scala-ide. I actually had less problems with false positives there I think (to ensime’s defence I could hardly type though).

False positives are most certainly not ensime-atom and probably not ensime-server either, but pres. compiler. However, you need to remember there are some big differences of ensime and ide’s in that ensime doesn’t really build. So you need to do that yourself: https://github.com/ensime/ensime-emacs/wiki/Edit-Compile-Workflow

I typically run a sbt ~compile on the side.

Arnout Engelen
@raboof
Dec 04 2015 09:04
yeah me too (well ~test actually :) )
Viktor Hedefalk
@hedefalk
Dec 04 2015 09:05
good for you! :)
I think this point however is often missed when coming from an IDE. I think I might add a big note on the readme of ensime-atom thinking of it…
Arnout Engelen
@raboof
Dec 04 2015 09:09
perhaps there should be a companion "atom-sbt" atom plugin that does that (and nicely presents the results), so we can recommend people to either use that or know what they're doing ;)
i've heard rumours about an 'sbt server api' but haven't kept track of whether that ever materialized
so back to my original issue: to verify whether something is a presentation compiler issue, the easiest thing to do is opening the project in Scala IDE and seeing whether it produces the same messages?
Viktor Hedefalk
@hedefalk
Dec 04 2015 09:18

Yeah, I got excited and tried to undestand this whole client/server sbt thing when I heard Josh talk about it in scalawags, but I found out nothing. It sounded that it was usable already but I turned in the door when I was pointed at typesafe/activator/play and stuff that I just don’t want to play with. I guess this is the ambition: https://github.com/sbt/sbt/wiki/Client-server-split (2013) but they probably haven’t come very far? I’m interested if you have any links describing this further and current state?

@fommil who knows more doesn’t sound super-excited :)

Yes, if a false pos. is also in scala-ide it’s def. presentation compiler. However, it might be anyways but scala-ide does something extra?
Arnout Engelen
@raboof
Dec 04 2015 12:06
hmm, the '1 second' postfix notation in AskTimeoutProvider does not show up as an error in scala-ide.
what would be a good next step to narrow that down?
Viktor Hedefalk
@hedefalk
Dec 04 2015 12:31
Hm, dunno really. Maybe I’m all wrong here. Gotta ask the big guys, @rorygraves, @fommil?
Ghost
@ghost~540393fe163965c9bc2018ce
Dec 04 2015 13:07
What's the problem? Got a minimal reproduction? I can check on Emacs
Arnout Engelen
@raboof
Dec 04 2015 13:08
in AskTimeoutProvider in https://github.com/xebia/cakemix I get an error on the 1 second postfix notation
at line 33, character 39, file /home/aengelen/xebia/wehkamp/cakemix/src/main/scala/xebia/cakemix/AskTimeoutProvider.scalavalue second is not a member of Int
Viktor Hedefalk
@hedefalk
Dec 04 2015 13:09

@raboof gets reproducable false positives on ’1 second’ postfix notation that he doesn’t get from Eclipse.

Just a thought, isn’t this a language-feature you have to enable since that crappy SIP? Maybe there’s a setting inside Eclipse that overrides sbt? You probably need it in build.sbt -> .ensime, right?

Like: scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature", "-language:postfixOps")
->

.ensime:

:compiler-args ("-Xfuture" "-Xlint" "-Yinline-warnings" "-Yno-adapted-args" "-Ywarn-dead-code" "-Ywarn-numeric-widen" "-Ywarn-unused-import" "-deprecation" "-feature" "-language:postfixOps" "-target:jvm-1.7" "-unchecked")

Should be the same in eclipse though but I’m just thinking maybe they have a bug that the setting in Eclipse takes precendence over the build definition?
Arnout Engelen
@raboof
Dec 04 2015 13:11
I do have -language:postfixOps in both project/Build.scala and .ensime :compiler-args
Viktor Hedefalk
@hedefalk
Dec 04 2015 13:12
Ok.
Rory Graves
@rorygraves
Dec 04 2015 13:13
I hadn't got as far as replying, but was having similar thoughts. I wonder if the presentation compiler is applying the user flags or the Ensime server flags when it runs. You could check the flags in jvisualvm for the server. I'm afk st the mo.
Arnout Engelen
@raboof
Dec 04 2015 13:18
I have jvisualvm running, but not sure where to look - ensime is started with -Densime.config=/home/aengelen/xebia/wehkamp/cakemix/.ensime which is OK, but wouldn't know how to tell how it's calling the presentation compiler
Rory Graves
@rorygraves
Dec 04 2015 13:21
I think that will be a question of digging round the server code. The default would warn though which is interesting. There is an import you can add to suppress the warning too (can't remember it off the cuff) would be interesting to see what effect that had.
Arnout Engelen
@raboof
Dec 04 2015 13:25
import language.postfixOps does not change the error
Viktor Hedefalk
@hedefalk
Dec 04 2015 13:26
Interesting!
Viktor Hedefalk
@hedefalk
Dec 04 2015 14:47
I’m trying your github repo. It’s def. not postfix but the implicit that isn’t picked up.
I had it blinking there once with my blue squigglies but then it dissappeared.
Viktor Hedefalk
@hedefalk
Dec 04 2015 15:00
It’s an implicit class inside a package object that isn’t picked up: https://github.com/scala/scala/blob/2.12.x/src/library/scala/concurrent/duration/package.scala#L43

import scala.concurrent.duration._
import scala.concurrent.duration.DurationInt

works fine

but only

import scala.concurrent.duration._

gives this false positive from pres. compiler.

Arnout Engelen
@raboof
Dec 04 2015 15:04
OK, so now I want to create a minimal example/test to show this problem in the pres. compiler I suppose. Haven't invoked that directly before ;).
Viktor Hedefalk
@hedefalk
Dec 04 2015 15:04
You go girl!
Viktor Hedefalk
@hedefalk
Dec 04 2015 15:12
If I once have added that import att made the compile error go away, I can later remove it without the error reoccuring…
Rory Graves
@rorygraves
Dec 04 2015 15:14
@raboof look in the Ensime server for tests around the PC
Arnout Engelen
@raboof
Dec 04 2015 15:14
@hedefalk hmm for me it reappears
@rorygraves thx for the pointer I'll have a look!