These are chat archives for typelevel/scala

13th
May 2017
Paul Phillips
@paulp
May 13 2017 05:48
So maybe I"m the last guy to notice, but... you guys do know that the typelevel compiler 2.12.2-bin-typelevel-4 depends on org.scala-lang.modules:scala-xml_2.12:1.0.6, which depends on org.scala-lang:scala-library:2.12.0 ? It means both the standard library v 2.12.0 and the typelevel standard library are on the classpath. As seen via coursier:
org/scala-lang/modules/scala-xml_2.12/1.0.6/scala-xml_2.12-1.0.6.jar
org/scala-lang/scala-library/2.12.0/scala-library-2.12.0.jar
org/typelevel/scala-reflect/2.12.2-bin-typelevel-4/scala-reflect-2.12.2-bin-typelevel-4.jar
org/typelevel/scala-library/2.12.2-bin-typelevel-4/scala-library-2.12.2-bin-typelevel-4.jar
org/typelevel/scala-compiler/2.12.2-bin-typelevel-4/scala-compiler-2.12.2-bin-typelevel-4.jar
Paul Phillips
@paulp
May 13 2017 06:12
This is uncool: I guess ANY type ascription inhibits inlining, even if the type being ascribed is exactly the type which, if inferred, allows inlining to take place. What a tangled web we weave.
scala> class F { final val x = 5 ; def sum: 10 = x + x }
defined class F

scala> class F { final val x: 5 = 5 ; def sum: 10 = x + x }
<console>:11: error: type mismatch;
 found   : Int
 required: 10
       class F { final val x: 5 = 5 ; def sum: 10 = x + x }
                                                      ^
And by inlining I mean constant folding.
Edmund Noble
@edmundnoble
May 13 2017 06:33
Still got two variants of literal types in the compiler :P
Dale Wijnand
@dwijnand
May 13 2017 09:09
@paulp yes, it's known, the different scala-library thing. Miles' change in sbt 0.13.13 mediates the dependency graph, swapping things according to scalaOrganization and scalaVersion. But it's an Ivy mechanism. I believe Alex just merged something to improve Typelevel support (specifically) in Coursier.
Paul Phillips
@paulp
May 13 2017 10:21
Changes to sbt, changes to coursier, everything specific to org.typelevel? Software banana republics.
Oron Port
@soronpo
May 13 2017 10:21
@paulp FYI, it compiles in dotty.
Paul Phillips
@paulp
May 13 2017 10:22
@soronpo I'll let my kids know
Dale Wijnand
@dwijnand
May 13 2017 10:27
sbt's changes aren't specific to org.typelevel.
Torsten Schmits
@tek
May 13 2017 15:12
I'm getting exhaustivity warnings about _ not being matched, what's that about?
Ghost
@ghost~540393fe163965c9bc2018ce
May 13 2017 16:18
I have TLS 4 working now with coursier, thanks to Alex fixing it in RC3.
but now I'm getting a bunch of false positive unused import warnings https://github.com/fommil/drone-dynamic-agents/
just sbt compile to see
I'm using "-Ywarn-unused:implicits,-imports,-locals,-params,-patvars,-privates" and there is no -Ywarn-unused-import
so I really shouldn't be getting these
> show scalacOptions
[info] * -encoding
[info] * UTF-8
[info] * -feature
[info] * -deprecation
[info] * -language:postfixOps
[info] * -language:implicitConversions
[info] * -Xlint
[info] * -Yno-adapted-args
[info] * -Ywarn-dead-code
[info] * -Xfuture
[info] * -unchecked
[info] * -Ywarn-value-discard
[info] * -Ywarn-numeric-widen
[info] * -language:higherKinds
[info] * -Ykind-polymorphism
[info] * -Ypartial-unification
[info] * -Yinduction-heuristics
[info] * -Yliteral-types
[info] * -Xstrict-patmat-analysis
[info] * -Ysysdef
[info] * java.lang.String,scala.{Any,AnyRef,AnyVal,Boolean,Byte,Double,Float,Short,Int,Long,Char,Symbol,Unit,Null,Nothing,Option,Some,None,Either,Left,Right,StringContext},scala.annotation.{tailrec,inductive},scala.collection.immutable.{Map,Seq,List,::,Nil,Set,Vector},scala.util.{Try,Success,Failure},scala.Predef.{???,ArrowAssoc,identity,<:<,=:=}
[info] * -Ypredef
[info] * _
[info] * -Ywarn-unused:implicits,-imports,-locals,-params,-patvars,-privates
the unused imports are coming from uses of @free (freestyle). The flags I've set correctly suppress the false positives from the sysdef feature.
actually this looks like a 2.12.2 LBS regression... I just checked the compile by removing all TLS features and going to 2.12.2 / org.scala-lang
Ghost
@ghost~540393fe163965c9bc2018ce
May 13 2017 16:23
dang
Seth Tisue
@SethTisue
May 13 2017 22:28
Since Paul's thing is a product of the circular dependency between Scaladoc generation and scala-xml, i will dutifully make my periodic PSA that that dependency could relatively easily be cut by a motivated volunteer
scala/bug#9560
Alexandre Archambault
@alexarchambault
May 13 2017 22:47
:point_up: 13 mai 2017 11:09 I confirm, this should be fine with sbt-coursier 1.0.0-RC3.
Alexandre Archambault
@alexarchambault
May 13 2017 23:11
(looks like alt+click inserts localized dates 😛)