Skip to content
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

Cross compile to Scala Native #301

Merged
merged 17 commits into from
Feb 5, 2018
Merged

Cross compile to Scala Native #301

merged 17 commits into from
Feb 5, 2018

Conversation

fthomas
Copy link
Owner

@fthomas fthomas commented Jun 27, 2017

No description provided.

@fthomas
Copy link
Owner Author

fthomas commented Jun 27, 2017

The build fails because of:

[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: org.typelevel#macro-compat_native0.3_2.11;1.1.1: not found
[warn] 	:: com.chuusai#shapeless_native0.3_2.11;2.3.2: not found
[warn] 	:: org.scalacheck#scalacheck_native0.3_2.11;1.13.4: not found
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::

@codecov-io
Copy link

codecov-io commented Jun 29, 2017

Codecov Report

Merging #301 into master will decrease coverage by 1.34%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #301      +/-   ##
==========================================
- Coverage   97.99%   96.65%   -1.35%     
==========================================
  Files          57       57              
  Lines         649      658       +9     
  Branches       12       12              
==========================================
  Hits          636      636              
- Misses         13       22       +9
Impacted Files Coverage Δ
...rc/main/scala/eu/timepit/refined/api/RefType.scala 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e1b5f1d...52196be. Read the comment docs.

@fthomas
Copy link
Owner Author

fthomas commented Feb 4, 2018

I worked around the missing dependencies and now compilation fails with

[error] scala.MatchError: <notype> (of class scala.reflect.internal.Types$NoType$)
[error] 	at scala.scalanative.nscplugin.NirGenType$SimpleType$.fromType(NirGenType.scala:34)
[error] 	at scala.scalanative.nscplugin.NirGenExpr$ExprBuffer.genApplyTypeApply(NirGenExpr.scala:1477)
[error] 	at scala.scalanative.nscplugin.NirGenExpr$ExprBuffer.genApply(NirGenExpr.scala:658)
[error] 	at scala.scalanative.nscplugin.NirGenExpr$ExprBuffer.genExpr(NirGenExpr.scala:93)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer$$anonfun$genBody$1$2.apply(NirGenStat.scala:386)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer$$anonfun$genBody$1$2.apply(NirGenStat.scala:386)
[error] 	at scala.scalanative.util.ScopedVar$.scoped(ScopedVar.scala:41)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer.genBody$1(NirGenStat.scala:385)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer.genNormalMethodBody(NirGenStat.scala:391)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer$$anonfun$genMethod$1.apply(NirGenStat.scala:211)
[error] 	at scala.scalanative.util.ScopedVar$.scoped(ScopedVar.scala:41)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer.genMethod(NirGenStat.scala:186)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer$$anonfun$genMethods$1.apply(NirGenStat.scala:171)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer$$anonfun$genMethods$1.apply(NirGenStat.scala:169)
[error] 	at scala.collection.immutable.List.foreach(List.scala:392)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer.genMethods(NirGenStat.scala:169)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer.genNormalClass(NirGenStat.scala:97)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer$$anonfun$genClass$1.apply$mcV$sp(NirGenStat.scala:72)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer$$anonfun$genClass$1.apply(NirGenStat.scala:71)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer$$anonfun$genClass$1.apply(NirGenStat.scala:71)
[error] 	at scala.scalanative.util.ScopedVar$.scoped(ScopedVar.scala:41)
[error] 	at scala.scalanative.nscplugin.NirGenStat$StatBuffer.genClass(NirGenStat.scala:70)
[error] 	at scala.scalanative.nscplugin.NirGenPhase$NirCodePhase$$anonfun$scala$scalanative$nscplugin$NirGenPhase$NirCodePhase$$genClass$1$1.apply(NirGenPhase.scala:92)
[error] 	at scala.scalanative.nscplugin.NirGenPhase$NirCodePhase$$anonfun$scala$scalanative$nscplugin$NirGenPhase$NirCodePhase$$genClass$1$1.apply(NirGenPhase.scala:91)
[error] 	at scala.scalanative.util.ScopedVar$.scoped(ScopedVar.scala:41)
[error] 	at scala.scalanative.nscplugin.NirGenPhase$NirCodePhase.scala$scalanative$nscplugin$NirGenPhase$NirCodePhase$$genClass$1(NirGenPhase.scala:91)
[error] 	at scala.scalanative.nscplugin.NirGenPhase$NirCodePhase$$anonfun$apply$1$$anonfun$apply$mcV$sp$1.apply(NirGenPhase.scala:101)
[error] 	at scala.scalanative.nscplugin.NirGenPhase$NirCodePhase$$anonfun$apply$1$$anonfun$apply$mcV$sp$1.apply(NirGenPhase.scala:101)
[error] 	at scala.collection.mutable.UnrolledBuffer$Unrolled.foreach(UnrolledBuffer.scala:239)
[error] 	at scala.collection.mutable.UnrolledBuffer.foreach(UnrolledBuffer.scala:145)
[error] 	at scala.scalanative.nscplugin.NirGenPhase$NirCodePhase$$anonfun$apply$1.apply$mcV$sp(NirGenPhase.scala:101)
[error] 	at scala.scalanative.nscplugin.NirGenPhase$NirCodePhase$$anonfun$apply$1.apply(NirGenPhase.scala:99)
[error] 	at scala.scalanative.nscplugin.NirGenPhase$NirCodePhase$$anonfun$apply$1.apply(NirGenPhase.scala:99)
[error] 	at scala.scalanative.util.ScopedVar$.scoped(ScopedVar.scala:41)
[error] 	at scala.scalanative.nscplugin.NirGenPhase$NirCodePhase.apply(NirGenPhase.scala:99)
[error] 	at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:467)
[error] 	at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:458)
[error] 	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:467)
[error] 	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:425)
[error] 	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:425)
[error] 	at scala.collection.Iterator$class.foreach(Iterator.scala:891)
[error] 	at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
[error] 	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:425)
[error] 	at scala.scalanative.nscplugin.NirGenPhase$NirCodePhase.run(NirGenPhase.scala:61)
[error] 	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1528)
[error] 	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1513)
[error] 	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1508)
[error] 	at scala.tools.nsc.Global$Run.compile(Global.scala:1609)
[error] 	at xsbt.CachedCompiler0.run(CompilerInterface.scala:130)
[error] 	at xsbt.CachedCompiler0.run(CompilerInterface.scala:105)
[error] 	at xsbt.CompilerInterface.run(CompilerInterface.scala:31)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] 	at sbt.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:237)
[error] 	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:111)
[error] 	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:90)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3(MixedAnalyzingCompiler.scala:83)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:134)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:74)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:117)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:305)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:305)
[error] 	at sbt.internal.inc.Incremental$.doCompile(Incremental.scala:101)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$compile$4(Incremental.scala:82)
[error] 	at sbt.internal.inc.IncrementalCommon.recompileClasses(IncrementalCommon.scala:110)
[error] 	at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:57)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$compile$3(Incremental.scala:84)
[error] 	at sbt.internal.inc.Incremental$.manageClassfiles(Incremental.scala:129)
[error] 	at sbt.internal.inc.Incremental$.compile(Incremental.scala:75)
[error] 	at sbt.internal.inc.IncrementalCompile$.apply(Compile.scala:61)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:309)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:267)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:158)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:237)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:68)
[error] 	at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:1427)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:1401)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error] 	at sbt.std.Transform$$anon$4.work(System.scala:66)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] 	at sbt.Execute.work(Execute.scala:271)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)

@fthomas
Copy link
Owner Author

fthomas commented Feb 4, 2018

coreNative/compile now compiles due to a14628c

@fthomas fthomas changed the title WIP: cross compile to Scala Native Cross compile to Scala Native Feb 5, 2018
@fthomas fthomas merged commit bbb92f7 into master Feb 5, 2018
@fthomas fthomas deleted the topic/scala-native branch February 6, 2018 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants