question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Ambiguous implicit values" errors that make no sense

See original GitHub issue

I am getting seemingly random error messages like

ambiguous implicit values:  both value derive$macro$121 of type => upickle.default.Writer[models.AdminFoodRecord]  and value derive$macro$137 of type => upickle.default.Writer[uk.ac.ncl.openlab.intake24.InheritableAttributes]  match expected type upickle.default.Writer[T1]
ambiguous implicit values:  both value derive$macro$190 of type => upickle.default.Writer[models.AdminFoodRecord]  and value derive$macro$206 of type => upickle.default.Writer[uk.ac.ncl.openlab.intake24.InheritableAttributes]  match expected type upickle.default.Writer[T1]
not enough arguments for method Tuple4W: (implicit evidence$13: upickle.default.Writer[T1], implicit evidence$14: upickle.default.Writer[T2], implicit evidence$15: upickle.default.Writer[T3], implicit evidence$16: upickle.default.Writer[T4])upickle.default.Writer[(T1, T2, T3, T4)]. Unspecified value parameters evidence$13, evidence$14, evidence$15...    
uPickle does not know how to write [T1]s; define an implicit Writer[T1] to teach it how

These are very confusing since the types that supposedly match the expected type are unrelated, so there is no way they can both match.

Also, this part: uPickle does not know how to write [T1]s; define an implicit Writer[T1] to teach it how – T1 does not seem to be a real type, just a placeholder name.

How can I make sense of this? In particular, how can I tell what is the actual type of T1?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
tannerezellcommented, Jan 24, 2017

Sometimes you can fix this by simply removing the import:

import upickle.default._

and instead import only the specific parts you need.

1reaction
lihaoyicommented, Dec 19, 2017

Bug bankruptcy

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type Class - Ambiguous Implicit Values Error - Scala Users
Hello! I'm studying the type classes by going through the excellent manual “Essential Scala”. I'm doing one of the exercises and trying to ......
Read more >
Ambiguous implicit values - scala - Stack Overflow
The problem is that you are making generic type A invariant. Instead this should be covariant. So this should be implemented as follows...
Read more >
"Ambiguous implicit values" errors that make no sense #168
I am getting seemingly random error messages like ambiguous implicit values: both value derive$macro$121 of type => upickle.default.
Read more >
Problem using sequence: ambiguous implicit values
Hi,. I've met some problems with the sequence method. Here is the code, illustrating my case: import scalaz._ import Scalaz._. object Start {...
Read more >
Zymposium — Explaining Implicits (Scala 2) - YouTube
This week, Adam and Kit explore the details of implicits. A defining feature of Scala, undergirding many of the language's more advanced ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found