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.

Implicit not being imported

See original GitHub issue

Compiler version

3.0.0-RC1

stdlibExtJVM> show Test / scalacOptions
[info] * -deprecation
[info] * -unchecked
[info] * -feature
[info] * -language:postfixOps
[info] * -language:implicitConversions
[info] * -language:higherKinds
[info] * -language:existentials
[info] * -source:3.0-migration
[info] * -Ykind-projector

Minimized code

Here I’m importing my TestUtil._ but TestUtil.scalazEqualFromUnivEq isn’t importing:

import japgolly.microlibs.testutil.TestUtil._

val x = japgolly.microlibs.testutil.TestUtil.scalazEqualFromUnivEq[Int] // ok
val y = scalazEqualFromUnivEq[Int] // error

Output

[error] 8 |val y = scalazEqualFromUnivEq[Int]
[error]   |        ^^^^^^^^^^^^^^^^^^^^^
[error]   |        Not found: scalazEqualFromUnivEq

Expectation

It should compile.

Reproduction

cd /tmp
git clone https://github.com/japgolly/microlibs-scala.git
cd microlibs-scala
git checkout bug/import
sbt stdlibExtJVM/test:compile

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
julienrfcommented, Mar 19, 2021

Shouldn’t you import japgolly.microlibs.testutil.TestUtil.given?

0reactions
som-snyttcommented, Jul 14, 2021

I was going to comment yesterday that I also tried the example project successfully. I didn’t get around to clarifying anything because I was lost in the gollyverse, which is bigger on the inside than it looks from without.

To pick up the ball metaphor, the previous discussion is like golf when one goes missing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when importing implicit · Issue #362 · benfred ... - GitHub
I currently have implicit==0.4.2 installed. When I try importing the package, I get this error: Python 3.7.6 >>> import implicit as imp ...
Read more >
Scala: How can an import prevent finding an implicit value?
My workaround is to rebind x to an implicit val before the import. Both of the following work:
Read more >
Implicit Imports in Scala | Baeldung on Scala
In this article, we're going to cover implicit imports in Scala. We'll cover what they are and then go into a bit of...
Read more >
Implicit Classes - Scala Documentation
Scala 2.10 introduced a new feature called implicit classes. An implicit class ... To use this class, just import it into scope and...
Read more >
Don't mark implicit imports as unused : SCL-3149
Currently imports that import implicit objects or functions are marked as unused, if the imported objects are not referenced directly.
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