I have git-cloned the Scala
compiler from github, I checked out v2.11.8 and issued commands "compile"
and "dist/mkPack" to create a standalone compiler utility. I then called
the newly generated scalac utility with the same parameters I found in the
SBT stack trace + all my Scala source files. Strangely, the stand-alone
compiler doesn't crash anymore. Either my version 2.11.8 is not the same as
the "standard" one, or the compiler crash is contingent upon the order in
which the Scala source files are specified?
--
You received this message because you are subscribed to a topic in the Google Groups "scala-internals" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-internals/S5eOumRh5_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I have git-cloned the Scala compiler from github, I checked out v2.11.8 and issued commands "compile" and "dist/mkPack" to create a standalone compiler utility. I then called the newly generated scalac utility with the same parameters I found in the SBT stack trace + all my Scala source files. Strangely, the stand-alone compiler doesn't crash anymore. Either my version 2.11.8 is not the same as the "standard" one, or the compiler crash is contingent upon the order in which the Scala source files are specified?
--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
Many thanks for your
answers, Stefan and Adriaan.
Indeed, I have tried to
publishLocal. If I generate the scala compiler with its own
custom scala version number, say "2.11.8-JL", then SBT tries
to use this version to find *all* dependencies, including Play
libraries, loggers, jdbc, absolutely everything. I would thus
like to be able to generate a "plain" local version 2.11.8 and
configure SBT so that it would pick it up. I obviously tried
to simply use 2.11.8, my own version was never picked up with
2.11.8. I fiddled with the scalaHome setting to no avail. Any
clue?
Thank you !
JL, Montréal.
You received this message because you are subscribed to a topic in the Google Groups "scala-internals" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-internals/S5eOumRh5_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-interna...@googlegroups.com.
I apologize, once I
corrected the new errors reported by the scala compiler that I
compiled myself, my own compiler also crashed with the same
exception as before. So it was simply a matter of input source
file sequencing. At the end, my own compiler 2.11.8 behaves
like the standard 2.11.8 one.
I am kind of stuck with
this issue because I made huge amount of changes in my code
these last two weeks, and I am totally unable to determine
what can be wrong. It is not as if I had 100% compile-able
code, changed a little method, recompiled to discover this
compiler crash.
Any possibility this
bug could be fixed in 2.11.8 ?
JL
You received this message because you are subscribed to a topic in the Google Groups "scala-internals" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-internals/S5eOumRh5_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-interna...@googlegroups.com.
I made a patch to the method "NotWithinBoundsErrorMessage" in file /src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala so that the message would contain "<no owner>" when tparams is an empty list, instead of crashing as it does now.
Now with my "custom patched compiler", I get this error message:
./app/com/coremigration/restless/data/OracleRowLike.scala:12:
error: type arguments [T] do not conform to <no owner>'s
type parameter bounds []
def rowid =
^ (the caret points to "rowid")
that appears in this
trait:
trait OracleRowLike[T
<: OracleTableDefinition[T]] extends RowLike[T] {
[...]
def rowid =
toDatumLinker[PhRowidFactory](tableDefinition.rowid)
}
Where "toDatumLinker" is defined as:
def toDatumLinker[F
<: PhFactory[F]](col: F#Col[T]) =
col.factory.link[T](col, bufferEntry)
And PhFactory having this relevant member "Col" :
trait PhFactory[F <:
PhFactory[F]] {
type Col[TD <:
TableDefinition[TD]] <: Column[TD, F]
}
And Column being a class with this type signature:
class Column[T <:
TableDefinition[T], F <: PhFactory[F]]
Any clue why the compiler would crash on this source code? I can't see what's wrong in my typing, it seems all pretty "normal" to me...
Many thanks for helping me to move forward in my project.
JL
You received this message because you are subscribed to a topic in the Google Groups "scala-internals" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-internals/S5eOumRh5_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-interna...@googlegroups.com.
Many thanks for your answers, Stefan and Adriaan.
Indeed, I have tried to publishLocal. If I generate the scala compiler with its own custom scala version number, say "2.11.8-JL", then SBT tries to use this version to find *all* dependencies
Many thanks to everyone, I found the exact bug that crashes the compiler.
The "PhFactory" I refer to in my previous email also had these members:
type T <:
PhDatum[F]
type L[TD <: TableDefinition[TD]] <: T with
PhDatumLinker[TD, F]
def link[TD <: TableDefinition[TD]](column: F#Col[TD],
bufferEntry: BufferEntry[TD]): F#L[TD]
I was using this with a concrete factory called PhCharacterFactory that had this concrete type implementation:
type L = PhCharacterLink[_]
Instead of:
type L[TD <:
TableDefinition[TD]] = PhCharacterLink[TD]
Now, would it be useful to your team if I were to build a smaller test case demonstrating the bug I had that crashes the compiler? If so, where should I post it?
Many thanks again.
JL, Montréal.
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
I changed my line
type L[TD <:
TableDefinition[TD]] = PhCharacterLink[TD]
To follow up on Seth's suggestion, I have tried this:
1) Updated Scala compiler's build.sbt file with:
baseVersion in Global
:= "2.11.8"
baseVersionSuffix in Global := "JL"
2) Compiled and published
local the Scala compiler with sbt commands "compile" and
"publishLocal" (all successfully).
3) Updated my own project's build.sbt file with:
scalaVersion :=
"2.11.8-JL"
scalaVersion in Test := "2.11.8-JL"
scalaBinaryVersion := "2.11"
scalaBinaryVersion in Test := "2.11"
When I compile, I get these SBT errors below.
Are there more settings to change when using 'scalaBinaryVersion := "2.11"' ?
I just want to have a
good recipe in case I hit an other compiler crash ;)
Many thanks!
JL
info] Resolving
net.contentobjects.jnotify#jnotify;0.94-play-1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scala-lang#scala-library;2.11.8-JL:
configuration not found in
org.scala-lang#scala-library;2.11.8-JL: 'default'. It was
required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[warn] :: org.scala-lang#scala-compiler;2.11.8-JL:
configuration not found in
org.scala-lang#scala-compiler;2.11.8-JL: 'default'. It was
required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.scala-lang:scala-library:2.11.8-JL
((sbt.Classpaths) Defaults.scala#L1293)
[warn] +-
org.scala-lang.modules:scala-java8-compat_2.11:0.7.0
[warn] +- com.typesafe.akka:akka-actor_2.11:2.4.12
[warn] +- com.typesafe.akka:akka-stream_2.11:2.4.12
[warn] +- com.typesafe.play:play-streams_2.11:2.5.10
[warn] +- com.typesafe.play:play_2.11:2.5.10
[warn] +- com.typesafe.play:play-server_2.11:2.5.10
((play.sbt.PlaySettings) PlaySettings.scala#L55)
[warn] +-
com.typesafe.play:play-netty-server_2.11:2.5.10
((play.sbt.PlayNettyServer) Play.scala#L68)
[warn] +- com.typesafe.play:play-docs_2.11:2.5.10
[warn] +- com.typesafe.play:play-omnidoc_2.11:2.5.10
((play.sbt.PlaySettings) PlaySettings.scala#L69)
[warn] +- ws-test:ws-test_2.11:1.0-SNAPSHOT
[warn] org.scala-lang:scala-compiler:2.11.8-JL
[warn] +-
org.scala-lang.modules:scala-pickling_2.11:0.10.0
[warn] +- org.scala-sbt:serialization_2.11:0.1.0
[warn] +- com.typesafe.sbtrc:client-2-11:0.3.1
[warn] +-
com.typesafe.play:fork-run-protocol_2.11:2.5.10
((play.sbt.forkrun.PlayForkRun) PlayForkRun.scala#L48)
[warn] +- com.typesafe.play:fork-run_2.11:2.5.10
((play.sbt.forkrun.PlayForkRun) PlayForkRun.scala#L48)
[warn] +- ws-test:ws-test_2.11:1.0-SNAPSHOT
sbt.ResolveException: unresolved dependency:
org.scala-lang#scala-library;2.11.8-JL: configuration not
found in org.scala-lang#scala-library;2.11.8-JL: 'default'. It
was required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
unresolved dependency:
org.scala-lang#scala-compiler;2.11.8-JL: configuration not
found in org.scala-lang#scala-compiler;2.11.8-JL: 'default'.
It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT
scala-tool
at
sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
at
sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
at
sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
at
sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at
sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
at
xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at
xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
at
xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at
xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:128)
at sbt.IvySbt.withIvy(Ivy.scala:125)
at sbt.IvySbt$Module.withModule(Ivy.scala:156)
at sbt.IvyActions$.updateEither(IvyActions.scala:168)
at
sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1481)
at
sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1477)
at
sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1512)
at
sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1510)
at
sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
at
sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1515)
at
sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1509)
at
sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1532)
at
sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1459)
at
sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1411)
at
scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at
sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at
sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at
sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at
sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at
sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved
dependency: org.scala-lang#scala-library;2.11.8-JL:
configuration not found in
org.scala-lang#scala-library;2.11.8-JL: 'default'. It was
required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[error] unresolved dependency:
org.scala-lang#scala-compiler;2.11.8-JL: configuration not
found in org.scala-lang#scala-compiler;2.11.8-JL: 'default'.
It was required from ws-test#ws-test_2.11;1.0-SNAPSHOT
scala-tool
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
In the build.sbt file of the scala compiler, I did put:
version := "2.11.8-abc"
globalVersionSettings
baseVersion in Global := "2.11.8"
baseVersionSuffix in Global := "abc"
Note that not using/setting the variables globalVersionSettings,
baseVersion and baseVersionSuffix results in fatal errors at SBT
startup. All of them need to be specified.
Then I used :
scalaVersion := "2.11.8-abc"
scalaVersion in Test := "2.11.8-abc"
scalaBinaryVersion := "2.11"
scalaBinaryVersion in Test := "2.11"
in my own project build.sbt file.
When I compile I get the same errors as before (see just below).
It would be interesting a have a documented recipe to build a local 2.11.8 scala compiler that we could use in our own projects, notably to help debug the kind of compiler crash I had.
Thank you!
JL
=================
[info] Updating
{file:/home/jacques/Documents/Projects/ActorDemo/}root...
[info] Resolving
com.fasterxml.jackson.datatype#jackson-datatype-jsr310;2.7.8
..[info] Resolving
org.eclipse.jetty.websocket#websocket-client;9.2.15.v20160210
.[info] Resolving
org.eclipse.jetty.websocket#websocket-common;9.2.15.v20160210
.[info] Resolving net.contentobjects.jnotify#jnotify;0.94-play-1
...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scala-lang#scala-library;2.11.8-abc:
configuration not found in
org.scala-lang#scala-library;2.11.8-abc: 'default'. It was
required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[warn] :: org.scala-lang#scala-compiler;2.11.8-abc:
configuration not found in
org.scala-lang#scala-compiler;2.11.8-abc: 'default'. It was
required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.scala-lang:scala-library:2.11.8-abc
((org.ensime.EnsimePlugin) EnsimePlugin.scala#L191)
[warn] +-
org.scala-lang.modules:scala-parser-combinators_2.11:1.0.4
[warn] +- com.typesafe:ssl-config-core_2.11:0.2.1
[warn] +- com.typesafe.akka:akka-stream_2.11:2.4.12
[warn] +- com.typesafe.play:play-streams_2.11:2.5.10
[warn] +- com.typesafe.play:play_2.11:2.5.10
[warn] +- com.typesafe.play:play-server_2.11:2.5.10
((play.sbt.PlaySettings) PlaySettings.scala#L55)
[warn] +-
com.typesafe.play:play-netty-server_2.11:2.5.10
((play.sbt.PlayNettyServer) Play.scala#L68)
[warn] +- com.typesafe.play:play-docs_2.11:2.5.10
[warn] +- com.typesafe.play:play-omnidoc_2.11:2.5.10
((play.sbt.PlaySettings) PlaySettings.scala#L69)
[warn] +- ws-test:ws-test_2.11:1.0-SNAPSHOT
[warn] org.scala-lang:scala-compiler:2.11.8-abc ((org.ensime.EnsimePlugin) EnsimePlugin.scala#L191)
[warn] +-
org.scala-lang.modules:scala-pickling_2.11:0.10.0
[warn] +- org.scala-sbt:serialization_2.11:0.1.0
[warn] +- com.typesafe.sbtrc:client-2-11:0.3.1
[warn] +-
com.typesafe.play:fork-run-protocol_2.11:2.5.10
((play.sbt.forkrun.PlayForkRun) PlayForkRun.scala#L48)
[warn] +- com.typesafe.play:fork-run_2.11:2.5.10
((play.sbt.forkrun.PlayForkRun) PlayForkRun.scala#L48)
[warn] +- ws-test:ws-test_2.11:1.0-SNAPSHOT
[trace] Stack trace suppressed: run last *:update for the full
output.
[error] (*:update) sbt.ResolveException: unresolved dependency:
org.scala-lang#scala-library;2.11.8-abc: configuration not found
in org.scala-lang#scala-library;2.11.8-abc: 'default'. It was
required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool
[error] unresolved dependency:
org.scala-lang#scala-compiler;2.11.8-abc: configuration not found
in org.scala-lang#scala-compiler;2.11.8-abc: 'default'. It was
required from ws-test#ws-test_2.11;1.0-SNAPSHOT scala-tool