Skip to content

Implicit not being imported #11798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
japgolly opened this issue Mar 18, 2021 · 9 comments
Closed

Implicit not being imported #11798

japgolly opened this issue Mar 18, 2021 · 9 comments
Assignees
Labels

Comments

@japgolly
Copy link
Contributor

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
@nicolasstucki
Copy link
Contributor

This was probably fixed in #11591

@japgolly
Copy link
Contributor Author

japgolly commented Mar 18, 2021

The problem still persists with Scala 3.0.0-RC2-bin-20210317-758782a-NIGHTLY so #11591 doesn't seem to have fixed this.

@nicolasstucki
Copy link
Contributor

@japgolly could you minimize it?

@nicolasstucki nicolasstucki added the stat:needs minimization Needs a self contained minimization label Mar 19, 2021
@julienrf
Copy link
Contributor

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

@japgolly
Copy link
Contributor Author

@julienrf Shouldn't have to with -source:3.0-migration. I'm trying to cross-compile code for Scala 2 and Scala 3.

@smarter
Copy link
Member

smarter commented Mar 31, 2021

Are you sure this is supposed to work? When I grep for scalazEqualFromUnivEq in the branch you linked to I get:

test-util/shared/src/main/scala/japgolly/microlibs/testutil/TestUtil.scala
4:import japgolly.univeq.UnivEqScalaz.scalazEqualFromUnivEq

stdlib-ext/shared/src/test/scala/japgolly/microlibs/stdlib_ext/ExtractorsTest.scala
7:val x = japgolly.microlibs.testutil.TestUtil.scalazEqualFromUnivEq[Int]
8:val y = scalazEqualFromUnivEq[Int]

So TestUtil isn't defining scalazEqualFromUnivEq.

@japgolly
Copy link
Contributor Author

japgolly commented Jul 9, 2021

Ah I'm so sorry for dropping the ball on this one. I raised over 100 tickets at that time and this one dropped through my fingers. I'll get back on this next week.

@odersky odersky closed this as completed Jul 13, 2021
@japgolly
Copy link
Contributor Author

Tried again with 3.0.0 final and this works now

@som-snytt
Copy link
Contributor

som-snytt commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants