Last version without Scala

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Last version without Scala

bdipso
Hi;

What is the version number of orbeon-forms that does not use SCALA that I can clone from github? I want to compile the project myself to understand the structure but because of sbt errors I can not continue.

I'll give it a try with with pure java...

Regards.
Reply | Threaded
Open this post in threaded view
|

Re: Last version without Scala

Erik Bruchez
Administrator
Without Scala would take you back more than 5 years ago, but if you pull the 4.9 branch, the build doesn't use sbt yet.

This said, you should be able to install sbt and just build master. If not, please let us know.

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Last version without Scala

Erik Bruchez
Administrator
FYI I just fixed an issue with an incorrect dependency which probably caused the problem.

    https://github.com/orbeon/orbeon-forms/commit/cb397b041a013893767e2baa3ef37a48e1e2a41f

Can you try again?

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Last version without Scala

bdipso
This post was updated on .
Hi Eric;

I've cloned the latest version, and tried to compile. Here is the error that I got, (It is a windows issue??)

Maybe it is really nothing, but as I said I don't know Scala (And I don't meant to learn it :) ) I hope this log might help you with your project.

Best regards.

Information:8/28/2015 7:11 PM - Compilation completed with 1 error and 31 warnings in 2m 56s 163ms
Error:scalac: Error: requirement failed: - is not a valid identifier
java.lang.IllegalArgumentException: requirement failed: - is not a valid identifier

	at scala.Predef$.require(Predef.scala:219)

	at org.scalajs.core.ir.Trees$.requireValidIdent(Trees.scala:61)

	at org.scalajs.core.ir.Trees$Ident.<init>(Trees.scala:45)

	at org.scalajs.core.compiler.JSEncoding$class.freshLocalIdent(JSEncoding.scala:71)

	at org.scalajs.core.compiler.GenJSCode.freshLocalIdent(GenJSCode.scala:31)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$78.apply(GenJSCode.scala:3864)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$78.apply(GenJSCode.scala:3858)

	at scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:728)

	at scala.collection.immutable.List.foreach(List.scala:381)

	at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:727)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase.org$scalajs$core$compiler$GenJSCode$JSCodePhase$$patchFunBodyWithBoxes(GenJSCode.scala:3858)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$org$scalajs$core$compiler$GenJSCode$JSCodePhase$$tryGenAndRecordAnonFunctionClassGeneric$4$$anonfun$apply$27.apply(GenJSCode.scala:3737)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$org$scalajs$core$compiler$GenJSCode$JSCodePhase$$tryGenAndRecordAnonFunctionClassGeneric$4$$anonfun$apply$27.apply(GenJSCode.scala:3732)

	at org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:35)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$org$scalajs$core$compiler$GenJSCode$JSCodePhase$$tryGenAndRecordAnonFunctionClassGeneric$4.apply(GenJSCode.scala:3732)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$org$scalajs$core$compiler$GenJSCode$JSCodePhase$$tryGenAndRecordAnonFunctionClassGeneric$4.apply(GenJSCode.scala:3692)

	at org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:35)

	at org.scalajs.core.compiler.JSEncoding$class.withNewLocalNameScope(JSEncoding.scala:54)

	at org.scalajs.core.compiler.GenJSCode.withNewLocalNameScope(GenJSCode.scala:31)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase.org$scalajs$core$compiler$GenJSCode$JSCodePhase$$tryGenAndRecordAnonFunctionClassGeneric(GenJSCode.scala:3692)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$org$scalajs$core$compiler$GenJSCode$JSCodePhase$$tryGenAndRecordAnonFunctionClass$2.apply(GenJSCode.scala:3536)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$org$scalajs$core$compiler$GenJSCode$JSCodePhase$$tryGenAndRecordAnonFunctionClass$2.apply(GenJSCode.scala:3534)

	at org.scalajs.core.compiler.util.ScopedVar$.withScopedVars(ScopedVar.scala:35)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase.org$scalajs$core$compiler$GenJSCode$JSCodePhase$$tryGenAndRecordAnonFunctionClass(GenJSCode.scala:3534)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$3.apply(GenJSCode.scala:224)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$3.apply(GenJSCode.scala:223)

	at scala.collection.TraversableLike$$anonfun$filterImpl$1.apply(TraversableLike.scala:259)

	at scala.collection.immutable.List.foreach(List.scala:381)

	at scala.collection.TraversableLike$class.filterImpl(TraversableLike.scala:258)

	at scala.collection.TraversableLike$class.filterNot(TraversableLike.scala:278)

	at scala.collection.AbstractTraversable.filterNot(Traversable.scala:104)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase.apply(GenJSCode.scala:223)

	at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply$mcV$sp(Global.scala:440)

	at scala.tools.nsc.Global$GlobalPhase.withCurrentUnit(Global.scala:431)

	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:440)

	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)

	at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:398)

	at scala.collection.Iterator$class.foreach(Iterator.scala:742)

	at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)

	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:398)

	at org.scalajs.core.compiler.GenJSCode$JSCodePhase.run(GenJSCode.scala:167)

	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1501)

	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1486)

	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1481)

	at scala.tools.nsc.Global$Run.compile(Global.scala:1582)

	at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)

	at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)

	at xsbt.CompilerInterface.run(CompilerInterface.scala:27)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:606)

	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)

	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)

	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)

	at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:29)

	at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)

	at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:62)

	at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:20)

	at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:606)

	at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
Reply | Threaded
Open this post in threaded view
|

Re: Last version without Scala

Erik Bruchez
Administrator
This AFAIK is a bug in IntelliJ's sbt support. It keeps rewriting .idea/scala-compiler.xml to contain the following:

    <profile name="SBT 2" modules="core" />
    <profile name="SBT 2" modules="formBuilder">
      <plugins>
        <plugin path="$USER_HOME$/.ivy2/cache/org.scala-js/scalajs-compiler_2.11.7/jars/scalajs-compiler_2.11.7-0.6.4.jar" />
      </plugins>
    </profile>

and it should be:

    <profile name="SBT 1" modules="core" />
    <profile name="SBT 2" modules="formBuilder">
      <plugins>
        <plugin path="$USER_HOME$/.ivy2/cache/org.scala-js/scalajs-compiler_2.11.7/jars/scalajs-compiler_2.11.7-0.6.4.jar" />
      </plugins>
    </profile>

If you change that file by hand and try to recompile, it should pass.

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Last version without Scala

bdipso
Yes you are right. After I fixed the file as you suggest, compilation issue resolved.

Then I tried to make war file. ANT complained about "Unable to execute sbt", so I changed built.xml file as (Make it windows style):
        <!-- Compile Scala.js -->
        <if>
            <isset property="skip.compilation"/>
            <then>
                <!-- This does in fact compile Scala.js files, but does not run the expensive optimizations -->
                <exec executable="cmd">
                    <arg value="/c"/>
                    <arg value="sbt.bat"/>
                    <arg value="project formBuilder"/>
                    <arg value="fastOptJSToExplodedWar"/>
                </exec>
            </then>
            <else>
                <exec executable="cmd">
                    <arg value="/c"/>
                    <arg value="sbt.bat"/>
                    <arg value="project formBuilder"/>
                    <arg value="fullOptJSToExplodedWar"/>
                </exec>
            </else>
        </if>

Then exec task started complaining about:
org.scalajs.core.tools.classpath.JSLibResolveException: Some references to JS libraries could not be resolved:
- Missing JS library: 2.1.3/jquery.js
  originating from: root:compile
So I changed build.sbt and restored commented out part:
libraryDependencies            += "be.doeraene"  %%% "scalajs-jquery" % "0.8.1-SNAPSHOT",
But ANT built failed again:
[info] Resolving be.doeraene#scalajs-jquery_sjs0.6_2.11;0.8.1-SNAPSHOT ...
[info] Resolving be.doeraene#scalajs-jquery_sjs0.6_2.11;0.8.1-SNAPSHOT ...[warn] 	module not found: be.doeraene#scalajs-jquery_sjs0.6_2.11;0.8.1-SNAPSHOT
[warn] ==== local: tried
[warn]   C:\Users\Berkhan\.ivy2\local\be.doeraene\scalajs-jquery_sjs0.6_2.11\0.8.1-SNAPSHOT\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/be/doeraene/scalajs-jquery_sjs0.6_2.11/0.8.1-SNAPSHOT/scalajs-jquery_sjs0.6_2.11-0.8.1-SNAPSHOT.pom
[info] Resolving org.scala-js#scalajs-compiler_2.11.7;0.6.4 ...
...
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: be.doeraene#scalajs-jquery_sjs0.6_2.11;0.8.1-SNAPSHOT: not found
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn] 	Note: Unresolved dependencies path:
[warn] 		be.doeraene:scalajs-jquery_sjs0.6_2.11:0.8.1-SNAPSHOT (C:\Java\workspace_PRM\orbeon-forms\build.sbt#L55)
....
[error] (formBuilder/*:update) sbt.ResolveException: unresolved dependency: be.doeraene#scalajs-jquery_sjs0.6_2.11;0.8.1-SNAPSHOT: not found
[error] Total time: 2 s, completed Aug 30, 2015 9:43:01 AM
Result: 1
Obviously this is a library that I don't have and there is a reason of that line being commented out.
So; I made that line :
libraryDependencies            += "be.doeraene"  %%% "scalajs-jquery" % "0.8.0",

Finally a successful built!...

Probably scalajs-jquery 0.8.1-SNAPSHOT library is a library that you managing on your own computer. I did not tried to run the war file yet, so I don't know what problems using scalajs-jquery 0.8.0 will couse.

Regards.
Reply | Threaded
Open this post in threaded view
|

Re: Last version without Scala

Erik Bruchez
Administrator
First, thanks for not giving up!

> Then I tried to make war file. ANT complained about "Unable to execute sbt", so I changed built.xml file as (Make it windows style):

Got it. There is probably a way to make this handle Windows and OS X/Linux using the `<os>` ant task:

    https://ant.apache.org/manual/Tasks/conditions.html

The following line was commented:

    libraryDependencies += "be.doeraene" %%% "scalajs-jquery" % "0.8.1-SNAPSHOT"

because it was referring to a local artifact. And version `0.8.0` had another issue, which was causing other build errors (but apparently not in your case, which is surprising!).

So I am trying another fix:

    https://github.com/orbeon/orbeon-forms/commit/2cbe804a892370cafce1797c01cf4681d4f1a351

And that seems to work on our build server. You'll let me know if this works for you now.

-Erik