These are chat archives for typelevel/scala

22nd
May 2017
Oron Port
@soronpo
May 22 2017 03:34
Miles Sabin
@milessabin
May 22 2017 10:43
@aparo your scala.js dependency should be CrossVersion.patch.
Odomontois
@Odomontois
May 22 2017 13:53
Is there example how I can use 2.12.2 typelevel scala (with new release encoding) along with addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
Oron Port
@soronpo
May 22 2017 13:55
@Odomontois checkout this branch of singleton-ops. I'm using 2.12.2 TLS with macro paradise.
Odomontois
@Odomontois
May 22 2017 14:00
@soronpo Thank you! But I'm little bit confused, where are your scalaVersion and crossScalaVersions are defined?
Oron Port
@soronpo
May 22 2017 14:02
In .travis.yml. I'm not that familiar with the mechanics. The author of this is @fthomas . I just change the version and it magically works :smile:
Odomontois
@Odomontois
May 22 2017 14:06
@soronpo Ok, thank you . CrossVersion.patch did the job
Is someone familiar with java.lang.IllegalArgumentException: Comparison method violates its general contract! during compilation?
Odomontois
@Odomontois
May 22 2017 14:12
java.lang.IllegalArgumentException: Comparison method violates its general contract!
        at java.util.TimSort.mergeHi(TimSort.java:899)
        at java.util.TimSort.mergeAt(TimSort.java:516)
        at java.util.TimSort.mergeForceCollapse(TimSort.java:457)
        at java.util.TimSort.sort(TimSort.java:254)
        at java.util.Arrays.sort(Arrays.java:1438)
        at scala.collection.SeqLike.sorted(SeqLike.scala:646)
        at scala.collection.SeqLike.sorted$(SeqLike.scala:634)
        at scala.collection.AbstractSeq.sorted(Seq.scala:41)
        at scala.collection.SeqLike.sortWith(SeqLike.scala:599)
        at scala.collection.SeqLike.sortWith$(SeqLike.scala:599)
        at scala.collection.AbstractSeq.sortWith(Seq.scala:41)
        at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.tryInduction(Implicits.scala:1189)
        at scala.tools.nsc.typechecker.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1774)
        at scala.tools.nsc.typechecker.Implicits.inferImplicit(Implicits.scala:92)
        at scala.tools.nsc.typechecker.Implicits.inferImplicit$(Implicits.scala:81)
        at scala.tools.nsc.Global$$anon$1.inferImplicit(Global.scala:479)
        at scala.tools.nsc.typechecker.Implicits.inferImplicitFor(Implicits.scala:39)
        at scala.tools.nsc.typechecker.Implicits.inferImplicitFor$(Implicits.scala:38)
        at scala.tools.nsc.Global$$anon$1.inferImplicitFor(Global.scala:479)
        at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$applyImplicitArgs$2(Typers.scala:174)
        at scala.tools.nsc.typechecker.Typers$Typer.applyImplicitArgs(Typers.scala:166)
        at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$adapt$2(Typers.scala:851)
        at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$silent$2(Typers.scala:719)
        at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:719)
        at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$adapt$1(Typers.scala:850)
        at scala.tools.nsc.typechecker.Typers$Typer.adaptToImplicitMethod$1(Typers.scala:485)
        at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1244)
        at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5645)
        at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5661)
        at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5605)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5609)
        at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$53(Typers.scala:4936)
        at scala.tools.nsc.typechecker.Typers$Typer.typedSelectInternal$1(Typers.scala:4929)
        at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:4907)
        at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:5034)
        at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5579)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5595)
        at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5631)
        at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5661)
        at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5605)
...
This one is happening only when -Yinduction-heuristics is on
Frank S. Thomas
@fthomas
May 22 2017 14:55
@Odomontois the Scala versions are defined by sbt-travisci via .travis.yml
Bjørn Madsen
@aeons
May 22 2017 16:44
hey, I get this error:
no-symbol does not have a type constructor (this may indicate scalac cannot find fundamental classes)
is that something that has a “well, duh” answer or should I work on getting a minimal example?
Paul Phillips
@paulp
May 22 2017 20:27
@aeons The parenthetical is one of those ad hoc error message adjustments made because that's the way things explode when it can't find either scala-reflect or scala-compiler on the classpath, can't remember which. But if nothing precedes that error, that's probably the reason.
Or even scala-library. Something something classpath.
Bjørn Madsen
@aeons
May 22 2017 20:28
okay
that is super weird because it started appearing suddenly after adding some code, but not changing any build configuration
so, changing to scalac and back to typelevel scala made it go away...
Paul Phillips
@paulp
May 22 2017 20:30
Did you try a full clean before that
Bjørn Madsen
@aeons
May 22 2017 20:31
yes, several times
and also manually deleting target/ and project/target/
Paul Phillips
@paulp
May 22 2017 20:33
The failure happens during compilation?
Bjørn Madsen
@aeons
May 22 2017 20:36
yes
it says it’s at a line like
case class Service[F[_]: Monad](dependency: Dependecy[F])
with call site: value dependency in package…
Paul Phillips
@paulp
May 22 2017 20:43
@Odomontois it means the typelevel changes caused the "is this implicit better than that implicit" order relation to become intransitive.
Edmund Noble
@edmundnoble
May 22 2017 20:44
The SI-2712 fix?
Paul Phillips
@paulp
May 22 2017 20:45
No, the -Yinduction-heuristics
Edmund Noble
@edmundnoble
May 22 2017 20:45
Oh shit. I didn't think it changed behavior.
Paul Phillips
@paulp
May 22 2017 20:45
I'm sure it wasn't intended to.
Edmund Noble
@edmundnoble
May 22 2017 20:45
I feel like we never understood implicit resolution enough to change it :/
Paul Phillips
@paulp
May 22 2017 20:46
Simply inspecting values in scalac is easily enough to change behavior.
Edmund Noble
@edmundnoble
May 22 2017 20:46
Then replace "implicit resolution" with "scalac"
Paul Phillips
@paulp
May 22 2017 20:57
@aeons it's been too long for me, so I can only say a rigorous inspection of what's on your classpath is likely to lead to the answer
Bjørn Madsen
@aeons
May 22 2017 21:10
okay thanks, I will try that if it pops up again :)