Getting error "could not find implicit value for parameter conv" when using pureconfig

238 views
Skip to first unread message

pishen tsai

unread,
May 29, 2016, 12:51:38 PM5/29/16
to Scala IDE User
Hello,

I'm trying to use pureconfig https://github.com/melrief/pureconfig

The code can compile and run using sbt, but Scala IDE 4.4.0 keep showing an error.

Here is the screenshot: https://dl.dropboxusercontent.com/u/2110761/pureconfig.png

This error is not shown when I'm using other system like ENSIME.

Is there any suggestion on how to fix it?

Thanks,
pishen

iulian dragos

unread,
May 30, 2016, 10:21:26 PM5/30/16
to scala-i...@googlegroups.com
Upgrading to the latest Scala version might help (you're on 2.10, right?). The IDE is using Scala 2.11.8 behind the scenes, maybe implicit resolution rules are slightly different, or the 2.10 libraries on the classpath aren't handled properly in compatibility mode (the compiler "knows" it's a 2.10 project and tries to behave like a 2.10 compiler, but it's really 2.11.8). The builder, though, should not show any errors, because that one is using the real 2.10 compiler. So the Problems View should be empty.

iulian
 

Thanks,
pishen

--
You received this message because you are subscribed to the Google Groups "Scala IDE User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-user/c856c9ef-39cc-4335-9710-9b85c3cc5ba6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

pishen tsai

unread,
May 30, 2016, 11:11:06 PM5/30/16
to Scala IDE User
I have upgraded the the Scala version to 2.11.8 (both in build.sbt and in Project -> Properties -> Scala Compiler -> Scala Installation -> 2.11.8 (built-in)), but the error still exists.

Here's the screenshot: https://dl.dropboxusercontent.com/u/2110761/pureconfig2.png

pishen

Iulian Dragos於 2016年5月31日星期二 UTC+8上午10時21分26秒寫道:

wpopie...@virtuslab.com

unread,
May 31, 2016, 4:36:15 AM5/31/16
to Scala IDE User
Yes, looks like PC is wrongly configured (if ensime is ok, scala ide uses same PC)? Working on it.

W.

wpopie...@virtuslab.com

unread,
Jun 1, 2016, 6:17:58 AM6/1/16
to Scala IDE User
Hello Pishen,

finally I pinned it down. There is the option in compiler `-Ymacro-expand` and presentation compiler has got it set to `discard` by default. You can override it in `right click on project -> Properties -> Scala Compiler / Additional command line parameters` with `-Ymacro-expand:normal` (which is default setting for scalac). But be aware that this setting is shared by both compilers (presentation and scalac) so to drop to default behavior just remove it.

W.

pishen tsai

unread,
Jun 1, 2016, 6:56:34 AM6/1/16
to Scala IDE User
Hello,

I tried to change it to `-Ymacro-expand:normal` and hit OK. But when I open Properties -> Scala Compiler again, I saw it changed back to `-Ymacro-expand:none` automatically.

pishen

wpopie...@virtuslab.com於 2016年6月1日星期三 UTC+8下午6時17分58秒寫道:

wpopie...@virtuslab.com

unread,
Jun 1, 2016, 7:05:27 AM6/1/16
to Scala IDE User
At the top of `Scala Compiler` you have a `Use Project Settings` checkbox. You need to check it I guess

pishen tsai

unread,
Jun 1, 2016, 7:16:04 AM6/1/16
to Scala IDE User
I already check `Use Project Settings`, but the additional command line parameters keep changing back automatically, hence I see no effect, the error still exists.
https://dl.dropboxusercontent.com/u/2110761/pureconfig3.png

Are you using Scala IDE 4.4.1 with sbteclipse 4.0.0? This behavior is same on my colleague's macbook.

pishen

wpopie...@virtuslab.com於 2016年6月1日星期三 UTC+8下午7時05分27秒寫道:

wpopie...@virtuslab.com

unread,
Jun 1, 2016, 7:26:21 AM6/1/16
to Scala IDE User
Just check if in your project/.settings/org.scala-ide.sdt.core.pref you find this entry:
scala.compiler.additionalParams=-Ymacro-expand\:normal

pishen tsai

unread,
Jun 1, 2016, 7:34:31 AM6/1/16
to Scala IDE User
I've open the file, change it to `scala.compiler.additionalParams=-Xlint -Xsource\:2.10 -Ymacro-expand\:normal` directly. And turn on Eclipse, check the project properties, it's `-Ymacro-expand:normal`, but the error still exists. I tried to clean the project, didn't help. Then, I go to check org.scala-ide.sdt.core.pref, it is changed back to `scala.compiler.additionalParams=-Xlint -Xsource\:2.10 -Ymacro-expand\:none`

Not sure what's the problem...

pishen

wpopie...@virtuslab.com於 2016年6月1日星期三 UTC+8下午7時26分21秒寫道:

wpopie...@virtuslab.com

unread,
Jun 1, 2016, 7:40:34 AM6/1/16
to Scala IDE User
Did you run sbt eclipse every time?

pishen tsai

unread,
Jun 1, 2016, 7:43:10 AM6/1/16
to scala-i...@googlegroups.com

No.

--
You received this message because you are subscribed to a topic in the Google Groups "Scala IDE User" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-ide-user/gLJN1-8Fz-U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-ide-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-user/2243a8f2-d889-498d-8ad8-8e8e1d8729e2%40googlegroups.com.

wpopie...@virtuslab.com

unread,
Jun 1, 2016, 7:48:57 AM6/1/16
to Scala IDE User
I don't know... Looks like something overrides pref file. I cannot say what is doing it. Rather not scala ide but what are your global scala ide settings? `Window -> Preferences -> Scala -> Compiler`

pishen tsai

unread,
Jun 1, 2016, 10:05:12 AM6/1/16
to Scala IDE User
Additional command line parameters is empty in Window -> Preferences -> Scala -> Compiler


wpopie...@virtuslab.com於 2016年6月1日星期三 UTC+8下午7時48分57秒寫道:

pishen tsai

unread,
Jun 1, 2016, 10:47:08 AM6/1/16
to Scala IDE User
Is there anything else I can do to help debug?

pishen tsai於 2016年6月1日星期三 UTC+8下午10時05分12秒寫道:

pishen tsai

unread,
Jun 1, 2016, 11:04:15 AM6/1/16
to Scala IDE User
Oh, I found that it can work if my project is using Scala 2.11.8, I just add the additional parameter and the error disappear. But it's still not working with Scala 2.10.6.

pishen tsai於 2016年6月1日星期三 UTC+8下午10時47分08秒寫道:

wpopie...@virtuslab.com

unread,
Jun 1, 2016, 4:12:35 PM6/1/16
to Scala IDE User
it is possible. scala IDE is compiled on 2.11.8 and I'm not sure if will work smoothly with 2.10.6. The way how macros are handled is different across versions. I think that Iulian mentioned it. I try it tomorrow but not expect too much :)

pishen tsai

unread,
Jun 1, 2016, 10:24:15 PM6/1/16
to Scala IDE User
Ok, thanks! At least it can work with 2.11.8, this is promising.

wpopie...@virtuslab.com於 2016年6月2日星期四 UTC+8上午4時12分35秒寫道:
Reply all
Reply to author
Forward
0 new messages