[
https://issues.apache.org/jira/browse/TOREE-420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16059961#comment-16059961
]
ASF GitHub Bot commented on TOREE-420:
--------------------------------------
GitHub user kalvinnchau opened a pull request:
https://github.com/apache/incubator-toree/pull/126
TOREE-420 Exclude org.scala-lang.modules from AddDeps
https://issues.apache.org/jira/browse/TOREE-420
Include `org.scala-lang.modules` as part of the always exclude list when
using the `%AddDeps` magic.
This prevents the `scala.reflect.internal.FatalError` that crashes the
kernel, when a new scala-lang module is included and reloaded.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kalvinnchau/incubator-toree TOREE-420
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-toree/pull/126.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #126
----
commit 6c6c7262ceffc89a251cfc00565933eabc01ec81
Author: Kalvin Chau <[email protected]>
Date: 2017-06-22T20:26:41Z
updated depdency downloaders to exclude org.scala-lang.modules to prevent
scala refelection issues TOREE-420
----
> AddDeps fails if transitive dependency includes org.scala-lang.modules
> ----------------------------------------------------------------------
>
> Key: TOREE-420
> URL: https://issues.apache.org/jira/browse/TOREE-420
> Project: TOREE
> Issue Type: Bug
> Components: Kernel
> Affects Versions: 0.2.0
> Environment: Spark 2.1.1, Scala 2.11.8, Built from source, commit id:
> c7b008506fa07538b42aa94b287a361a64f71ee6
> Reporter: Kalvin Chau
>
> When using the AddDeps magic, if the dependency includes
> org.scala-lang.modules it fails with a reflection error, this kafka depdency
> for example:
> {code}
> %AddDeps org.apache.kafka kafka_2.11 0.10.2.0 --transitive --trace --verbose
> {code}
> {code}
> {'buffers': [],
> 'content': {'ename': 'scala.reflect.internal.FatalError',
> 'evalue': 'object Predef does not have a member classOf',
> 'traceback':
> ['scala.reflect.internal.Definitions$DefinitionsClass.scala$reflect$internal$Definitions$DefinitionsClass$$fatalMissingSymbol(Definitions.scala:1186)',
>
> 'scala.reflect.internal.Definitions$DefinitionsClass.getMember(Definitions.scala:1203)',
>
> 'scala.reflect.internal.Definitions$DefinitionsClass.getMemberMethod(Definitions.scala:1238)',
>
> 'scala.reflect.internal.Definitions$DefinitionsClass$RunDefinitions.Predef_classOf$lzycompute(Definitions.scala:1469)',
>
> 'scala.reflect.internal.Definitions$DefinitionsClass$RunDefinitions.Predef_classOf(Definitions.scala:1469)',
>
> 'scala.reflect.internal.Definitions$DefinitionsClass$RunDefinitions.isPredefClassOf(Definitions.scala:1459)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typedIdent$2(Typers.scala:4885)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typedIdentOrWildcard$1(Typers.scala:4908)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5340)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5360)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)',
>
> 'scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:36)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5472)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5480)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5012)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5312)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5396)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5423)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5370)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5374)',
>
> 'scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:36)',
>
> 'scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5448)',
>
> 'scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:102)',
>
> 'scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:440)',
>
> 'scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:431)',
>
> 'scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:440)',
>
> 'scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:94)',
>
> 'scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:93)',
> {code}
> However, the kafka 2.10 version does not fail:
> {code}
> %AddDeps org.apache.kafka kafka_2.10 0.10.2.0 --transitive --trace --verbose
> {code}
> After inspecting the pom files for each of the versions, the only difference
> was the dependency on
> {code}
> <dependency>
> <groupId>org.scala-lang.modules</groupId>
> <artifactId>scala-parser-combinators_2.11</artifactId>
> <version>1.0.4</version>
> <scope>compile</scope>
> {code}
> We should exclude the org.scala-lang.modules organization as well.
> Including org.scala-lang.modules as a exclusion fixes this issue.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)