Having trouble with sourcemaps in ScalaJS-0.5.0-RC1 NodeJSEnv

338 views
Skip to first unread message

Haoyi Li

unread,
May 30, 2014, 12:54:22 AM5/30/14
to scal...@googlegroups.com
The source trace is pasted below, along with the result of findFile (None). Were source maps meant to be fixed in RC1?

findFile [stdin] None
trace sjsr.StackTrace$.createException([stdin]:82654)
findFile [stdin] None
trace sjsr.StackTrace$.captureState([stdin]:82650)
findFile [stdin] None
trace jl.Throwable.fillInStackTrace([stdin]:86698)
findFile [stdin] None
trace jl.Throwable.<init>([stdin]:86775)
findFile [stdin] None
trace jl.RuntimeException.<init>([stdin]:273475)
findFile [stdin] None
trace s.MatchError.<init>([stdin]:298923)
findFile [stdin] None
trace Lutest.Asserts$$anonfun$tests$14$$anonfun$apply$4$$anonfun$apply$5.apply([stdin]:234098)
findFile [stdin] None
trace Lutest.Asserts$$anonfun$tests$14$$anonfun$apply$4$$anonfun$apply$5.apply([stdin]:234103)
findFile [stdin] None
trace Lutest.framework.TestThunkTree.run([stdin]:139469)
findFile [stdin] None
trace Lutest.framework.TestThunkTree.run([stdin]:139466)

Sébastien Doeraene

unread,
May 30, 2014, 4:17:47 AM5/30/14
to Haoyi Li, scal...@googlegroups.com

Hi,

I can't investigate right now, but yes, source maps are supposed to work well in RC1.

Sébastien

--
You received this message because you are subscribed to the Google Groups "Scala.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-js+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sébastien Doeraene

unread,
May 30, 2014, 4:19:20 AM5/30/14
to Haoyi Li, scal...@googlegroups.com

Likely cause: the positions in your trace mention 'stdin'. That would likely not map to a source map.

Sébastien

Haoyi Li

unread,
May 31, 2014, 3:15:07 AM5/31/14
to Sébastien Doeraene, scal...@googlegroups.com
Are the positions *not* meant to be [stdin]? I'm doing 

val jsClasspath = testClassLoader.asInstanceOf[JSClasspathLoader]
environment.runJS(jsClasspath, testRunnerFile, ...)

Same as you guys were doing in your scalajs plugin. Whereever the source code of everything is being fed into the NodeJS process, it seems outside my control.

Sébastien Doeraene

unread,
May 31, 2014, 5:15:19 AM5/31/14
to Haoyi Li, scal...@googlegroups.com

Hum I will have to check that again. However I won't have opportunity to do so until Monday.
Sébastien

Haoyi Li

unread,
May 31, 2014, 12:37:51 PM5/31/14
to Sébastien Doeraene, scal...@googlegroups.com
Ok, looks like it's giving me proper input files when I do fastOptStage::test and fullOptStage::test, but it's [stdin] when I do plain old test. I don't know why that's the case, but I'll just run with that for now.

Haoyi Li

unread,
Jun 1, 2014, 1:58:27 PM6/1/14
to Sébastien Doeraene, scal...@googlegroups.com
So it turns out we're not out of the woods yet! The following example:

object Main extends js.JSApp{
  def main(): Unit = {
    val e = new ArrayIndexOutOfBoundsException().getStackTrace
    println(e(0).getFileName)
  }
}

Gives me 

(Personal)/Workspace/utest/js/target/scala-2.10/utest-test-js-fastopt.js

When run under NodeJSEnv. It probably should give me 

/Users/haoyi/Dropbox (Personal)/Workspace/utest/js/target/scala-2.10/utest-test-js-fastopt.js

I haven't managed to minimize it, because I've had problems getting js/fastOptStage::run to run with a non-NodeJS runtime environment, and the scala-js-example-app hasn't been updated to use 0.5.0-RC1 so I don't have anything to monkey. FWIW, js/fastOptStage::test works with whatever JSEnv I specify just fine.

When running under PhantomJS and js/fastOptStage::test, when I catch an exception and print its stack trace element's contents as follows:

Array(s.getClassName, s.getMethodName, s.getFileName, s.getLineNumber, s.getColumnNumber).toSeq

I get things like

WrappedArray(<jscode>,     at file:///Users/haoyi/Dropbox%20(Personal)/Workspace/utest/js/target/scala-2.10/utest-test-js-test-fastopt.js:10025, null, -1, -1)

While NodeJS gives me things like

WrappedArray(s.MatchError, <init>, (Personal)/Workspace/utest/js/target/scala-2.10/utest-test-js-test-fastopt.js, 37632, 51)

Which looks less-wrong, except for the fact that my file-name is getting cut off in the space in the file path.

It seems its a NodeJS problem; do you have any ideas of how it could be fixed or worked around? Does this affect ScalaJS's own source maps too? I really want to get source maps working with uTest in time for 0.5.0 =)

Sébastien Doeraene

unread,
Jun 1, 2014, 2:07:34 PM6/1/14
to Haoyi Li, scal...@googlegroups.com
Hi,


the scala-js-example-app hasn't been updated to use 0.5.0-RC1

Look at the next branch. https://github.com/sjrd/scala-js-example-app/tree/next

/Users/haoyi/Dropbox (Personal)/Workspace/utest/js/target/scala-2.10/utest-test-js-fastopt.js

Ah. Could you try in a directory whose path does not contain spaces, please?

Sébastien

Haoyi Li

unread,
Jun 1, 2014, 5:21:13 PM6/1/14
to Sébastien Doeraene, scal...@googlegroups.com
Well here's a new problem. When I move the project folder to one without spaces in the name, I get the following error. The sourcemap file is attached. Any idea what's wrong?

com.google.debugging.sourcemap.SourceMapParseException: unable to detect source map format
at com.google.debugging.sourcemap.SourceMapConsumerFactory.parse(SourceMapConsumerFactory.java:80)
at com.google.debugging.sourcemap.SourceMapConsumerFactory.parse(SourceMapConsumerFactory.java:38)
at scala.scalajs.tools.sourcemap.SourceMapper.map(SourceMapper.scala:31)
at scala.scalajs.tools.sourcemap.SourceMapper$$anonfun$2.apply(SourceMapper.scala:21)
at scala.scalajs.tools.sourcemap.SourceMapper$$anonfun$2.apply(SourceMapper.scala:20)
at scala.Option.map(Option.scala:145)
at scala.scalajs.tools.sourcemap.SourceMapper.map(SourceMapper.scala:20)
at utest.jsrunner.JsRunner$$anon$1.log(JsRunner.scala:54)
at scala.scalajs.sbtplugin.env.ExternalJSEnv$$anonfun$pipeToConsole$1.apply(ExternalJSEnv.scala:91)
at scala.scalajs.sbtplugin.env.ExternalJSEnv$$anonfun$pipeToConsole$1.apply(ExternalJSEnv.scala:91)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at scala.scalajs.sbtplugin.env.ExternalJSEnv.pipeToConsole(ExternalJSEnv.scala:91)
at scala.scalajs.sbtplugin.env.ExternalJSEnv.runJS(ExternalJSEnv.scala:48)
at utest.jsrunner.JsRunner.doStuff(JsRunner.scala:34)
at utest.runner.GenericRunner$$anonfun$tasks$1$$anonfun$apply$1.apply(GenericRunner.scala:32)
at utest.runner.GenericRunner$$anonfun$tasks$1$$anonfun$apply$1.apply(GenericRunner.scala:32)
at utest.runner.Task.execute(Task.scala:20)
at sbt.TestRunner.runTest$1(TestFramework.scala:84)
at sbt.TestRunner.run(TestFramework.scala:94)
at sbt.TestFramework$$anon$2$$anonfun$$init$$1$$anonfun$apply$8.apply(TestFramework.scala:224)
at sbt.TestFramework$$anon$2$$anonfun$$init$$1$$anonfun$apply$8.apply(TestFramework.scala:224)
at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:212)
at sbt.TestFramework$$anon$2$$anonfun$$init$$1.apply(TestFramework.scala:224)
at sbt.TestFramework$$anon$2$$anonfun$$init$$1.apply(TestFramework.scala:224)
at sbt.TestFunction.apply(TestFramework.scala:229)
at sbt.Tests$$anonfun$7.apply(Tests.scala:196)
at sbt.Tests$$anonfun$7.apply(Tests.scala:196)
at sbt.std.Transform$$anon$3$$anonfun$apply$2.apply(System.scala:45)
at sbt.std.Transform$$anon$3$$anonfun$apply$2.apply(System.scala:45)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
utest-test-js-test-fastopt.js.map

Haoyi Li

unread,
Jun 1, 2014, 6:13:58 PM6/1/14
to Sébastien Doeraene, scal...@googlegroups.com
Ok, looks like scala-js-example-app has borked stacktraces too, so it's not just uTest's fault =P

Here's what it looks like when I force it to throw an exception when run in my folder-with-space-in-name:

Rhino:

haoyi-mbp:scala-js-example-app haoyi$ sbt test
[info] Loading global plugins from /Users/haoyi/.sbt/0.13/plugins
[info] Loading project definition from /Users/haoyi/Dropbox (Personal)/Workspace/scala-js-example-app/project
[info] Set current project to Example (in build file:/Users/haoyi/Dropbox%20(Personal)/Workspace/scala-js-example-app/)
[info] Compiling 1 Scala source to /Users/haoyi/Dropbox (Personal)/Workspace/scala-js-example-app/target/scala-2.11/classes...
[info] Compiling 1 Scala source to /Users/haoyi/Dropbox (Personal)/Workspace/scala-js-example-app/target/scala-2.11/test-classes...
[error] Test framework scala.scalajs.test.JasmineTestFramework$ failed:
[error] lolz
[error] <jscode>.anonymous(file:/Users/haoyi/Dropbox%20(Personal)/Workspace/scala-js-example-app/src/test/scala/example/ScalaJSExampleTest.scala:15)
[error] <jscode>.anonymous(file:/Users/haoyi/Dropbox%20(Personal)/Workspace/scala-js-example-app/src/test/scala/example/ScalaJSExampleTest.scala:51)
[error] <jscode>.(Generated test launcher file:1)
[error] Error: Total 2, Failed 0, Errors 2, Passed 0
[error] Error during tests:
[error] example.ScalaJSExampleTest
[error] (test:test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 34 s, completed Jun 1, 2014 2:54:20 PM

NodeJS

haoyi-mbp:scala-js-example-app haoyi$ sbt test
[info] Loading global plugins from /Users/haoyi/.sbt/0.13/plugins
[info] Loading project definition from /Users/haoyi/Dropbox (Personal)/Workspace/scala-js-example-app/project
[info] Set current project to Example (in build file:/Users/haoyi/Dropbox%20(Personal)/Workspace/scala-js-example-app/)
[error] Test framework scala.scalajs.test.JasmineTestFramework$ failed:
[error] lolz
[error] sjsr.StackTrace$.createException([stdin]:81418)
[error] sjsr.StackTrace$.captureState([stdin]:81414)
[error] jl.Throwable.fillInStackTrace([stdin]:86431)
[error] jl.Throwable.<init>([stdin]:86508)
[error] jl.Exception.<init>([stdin]:230724)
[error] Lexample.ScalaJSExampleTest$.<init>([stdin]:213440)
[error] <jscode>.ScalaJS.m.Lexample_ScalaJSExampleTest([stdin]:213476)
[error] sjs.test.JasmineTestFramework$.runTest([stdin]:168342)
[error] <jscode>.Object.ScalaJS.i.sjs_test_TestFramework$class__safeRunTest__sjs_test_TestFramework__sjs_test_TestOutput__sjs_js_Array__sjs_js_Function0__V([stdin]:11606)
[error] sjs.test.JasmineTestFramework$.safeRunTest([stdin]:168330)
[error] Error: Total 2, Failed 0, Errors 2, Passed 0
[error] Error during tests:
[error] example.ScalaJSExampleTest
[error] (test:test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 26 s, completed Jun 1, 2014 2:56:27 PM

haoyi-mbp:scala-js-example-app haoyi$ sbt fastOptStage::test
[info] Loading global plugins from /Users/haoyi/.sbt/0.13/plugins
[info] Loading project definition from /Users/haoyi/Dropbox (Personal)/Workspace/scala-js-example-app/project
[info] Set current project to Example (in build file:/Users/haoyi/Dropbox%20(Personal)/Workspace/scala-js-example-app/)
[info] Fast optimizing /Users/haoyi/Dropbox (Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js
[error] Test framework scala.scalajs.test.JasmineTestFramework$ failed:
[error] lolz
[error] sjsr.StackTrace$.createException(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:15475)
[error] sjsr.StackTrace$.captureState(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:15471)
[error] jl.Throwable.fillInStackTrace(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:4474)
[error] jl.Throwable.<init>(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:4496)
[error] jl.Exception.<init>(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:17405)
[error] Lexample.ScalaJSExampleTest$.<init>(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:17212)
[error] <jscode>.ScalaJS.m.Lexample_ScalaJSExampleTest (/Users/haoyi/Dropbox(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:17249)
[error] sjs.test.JasmineTestFramework$.runTest(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:14711)
[error] <jscode>.Object.ScalaJS.i.sjs_test_TestFramework$class__safeRunTest__sjs_test_TestFramework__sjs_test_TestOutput__sjs_js_Array__sjs_js_Function0__V (/Users/haoyi/Dropbox(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:2495)
[error] sjs.test.JasmineTestFramework$.safeRunTest(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:14699)
[error] Error: Total 2, Failed 0, Errors 2, Passed 0
[error] Error during tests:
[error] example.ScalaJSExampleTest
[error] (test:fastOptStage::test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 3 s, completed Jun 1, 2014 2:57:31 PM

PhantomJSEnv:

haoyi-mbp:scala-js-example-app haoyi$ sbt fastOptStage::test
[info] Loading global plugins from /Users/haoyi/.sbt/0.13/plugins
[info] Loading project definition from /Users/haoyi/Dropbox (Personal)/Workspace/scala-js-example-app/project
[info] Set current project to Example (in build file:/Users/haoyi/Dropbox%20(Personal)/Workspace/scala-js-example-app/)
[error] Test framework scala.scalajs.test.JasmineTestFramework$ failed:
[error] lolz
[error] sjsr.StackTrace$.createException(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:15475)
[error] sjsr.StackTrace$.captureState(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:15471)
[error] jl.Throwable.fillInStackTrace(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:4474)
[error] jl.Throwable.<init>(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:4496)
[error] jl.Exception.<init>(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:17405)
[error] Lexample.ScalaJSExampleTest$.<init>(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:17212)
[error] <jscode>.ScalaJS.m.Lexample_ScalaJSExampleTest (/Users/haoyi/Dropbox(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:17249)
[error] sjs.test.JasmineTestFramework$.runTest(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:14711)
[error] <jscode>.Object.ScalaJS.i.sjs_test_TestFramework$class__safeRunTest__sjs_test_TestFramework__sjs_test_TestOutput__sjs_js_Array__sjs_js_Function0__V (/Users/haoyi/Dropbox(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:2495)
[error] sjs.test.JasmineTestFramework$.safeRunTest(Personal)/Workspace/scala-js-example-app/target/scala-2.11/example-test-fastopt.js:14699)
[error] Error: Total 2, Failed 0, Errors 2, Passed 0
[error] Error during tests:
[error] example.ScalaJSExampleTest
[error] (test:fastOptStage::test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 1 s, completed Jun 1, 2014 2:58:27 PM


Here it is dying with the same problem when running in a folder without a space in its path:

NodeJS

haoyi-mbp:scala-js-example-app haoyi$ sbt fastOptStage::test
[info] Loading global plugins from /Users/haoyi/.sbt/0.13/plugins
[info] Loading project definition from /Users/haoyi/work/scala-js-example-app/project
[info] Set current project to Example (in build file:/Users/haoyi/work/scala-js-example-app/)
[info] Updating {file:/Users/haoyi/work/scala-js-example-app/}scala-js-example-app...
[info] Resolving jline#jline;2.11 ...
[info] Done updating.
[info] Compiling 1 Scala source to /Users/haoyi/work/scala-js-example-app/target/scala-2.11/classes...
[info] Compiling 1 Scala source to /Users/haoyi/work/scala-js-example-app/target/scala-2.11/test-classes...
[info] Fast optimizing /Users/haoyi/work/scala-js-example-app/target/scala-2.11/example-test-fastopt.js
[error] Test framework scala.scalajs.test.JasmineTestFramework$ failed:
com.google.debugging.sourcemap.SourceMapParseException: unable to detect source map format
at com.google.debugging.sourcemap.SourceMapConsumerFactory.parse(SourceMapConsumerFactory.java:80)
at com.google.debugging.sourcemap.SourceMapConsumerFactory.parse(SourceMapConsumerFactory.java:38)
at scala.scalajs.tools.sourcemap.SourceMapper.map(SourceMapper.scala:31)
at scala.scalajs.tools.sourcemap.SourceMapper$$anonfun$2.apply(SourceMapper.scala:21)
at scala.scalajs.tools.sourcemap.SourceMapper$$anonfun$2.apply(SourceMapper.scala:20)
at scala.Option.map(Option.scala:145)
at scala.scalajs.tools.sourcemap.SourceMapper.map(SourceMapper.scala:20)
at scala.scalajs.sbtplugin.testing.TestOutputConsole.log(TestOutputConsole.scala:104)
at scala.scalajs.sbtplugin.env.ExternalJSEnv$$anonfun$pipeToConsole$1.apply(ExternalJSEnv.scala:91)
at scala.scalajs.sbtplugin.env.ExternalJSEnv$$anonfun$pipeToConsole$1.apply(ExternalJSEnv.scala:91)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at scala.scalajs.sbtplugin.env.ExternalJSEnv.pipeToConsole(ExternalJSEnv.scala:91)
at scala.scalajs.sbtplugin.env.ExternalJSEnv.runJS(ExternalJSEnv.scala:48)
at scala.scalajs.sbtplugin.testing.TestTask.execute(TestTask.scala:44)
[error] Could not run test example.ScalaJSExampleTest: com.google.debugging.sourcemap.SourceMapParseException: unable to detect source map format
[error] Error: Total 0, Failed 0, Errors 0, Passed 0
[error] Error during tests:
[error] example.ScalaJSExampleTest
[error] (test:fastOptStage::test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 7 s, completed Jun 1, 2014 3:08:25 PM




Sébastien Doeraene

unread,
Jun 2, 2014, 11:54:54 AM6/2/14
to Haoyi Li, scal...@googlegroups.com
Hi,

OK, with Node.js or Phantom.js and without fastOptStage, it is "normal" that it doesn't work. Non-Rhino interpreters have subpar support when using the preLink stage (the stage enabled when none of packageStage/fastOptStage/fullOptStage is used). Conversely, Rhino typically dies on any post-link stage.

I'll investigate the "unable to detect source map format" error, and the problem with spaces in names.

Sébastien

Haoyi Li

unread,
Jun 4, 2014, 12:42:26 AM6/4/14
to Sébastien Doeraene, scal...@googlegroups.com
Now I'm getting 

SyntaxError: Parse error

Trying to run my Scalatags tests under PhantomJS. I've seen that error before, but don't remember exactly when. This doesn't happen under Node, but I'd like to test my code against the DOM (I'm building a version of Scalatags that generates a dom.HTMLElment instead of a String) so I need to run it against PhantomJS. Have you seen this before?

Haoyi Li

unread,
Jun 4, 2014, 1:33:26 AM6/4/14
to Sébastien Doeraene, scal...@googlegroups.com
FWIW, I have been unsuccessful at finding out where the file is generated before being fed into PhantomJS. Is it even dumped to disk anywhere? Pretty hard to debug when I have no idea what's being run =<

Sébastien Doeraene

unread,
Jun 4, 2014, 2:28:49 AM6/4/14
to Haoyi Li, scal...@googlegroups.com

Ouch. No I have never seen that before.

The files are dumped to disk, but in a temporary location. IIRC Tobias made the thing display where it outputs them under 'debug', so you can see where it is with the `last` command.

Sébastien

Haoyi Li

unread,
Jun 4, 2014, 2:48:18 AM6/4/14
to Sébastien Doeraene, scal...@googlegroups.com
The SyntaxError: Parse Error error was what I get when I run using PhantomJS and `test`. Using FastOptStage::test or FullOptStage::test, I instead get

HELLO WORLD
HELLO WORLD 2 [object Object]
ReferenceError: Can't find variable: PlatformShims

  file:///var/folders/xw/4lw_p32d0pg88hyg5rfn7vqxqhkgj_/T/phantomjs-launcher-webpage2671526029499906267.html:42

Again, when I look at that place in /var/folders/xw/..., there's nothing there =(

Haoyi Li

unread,
Jun 4, 2014, 2:52:07 AM6/4/14
to Sébastien Doeraene, scal...@googlegroups.com
Running under debug doesn't show me anything useful I didn't already know. Is there some setting somewhere I can use to redirect where the file is being output so I can inspect it?

> debug
[debug] > shell
> js/test-only -- scalatags.JsDomTests.helloWorld
[debug] > js/test-only -- scalatags.JsDomTests.helloWorld
[debug] Running task... Cancelable: false, check cycles: false
[debug]
[debug] Initial source changes:
[debug] removed:Set()
[debug] added: Set()
[debug] modified: Set()
[debug] Removed products: Set()
[debug] Modified external sources: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set()
[debug]
[debug] Sources indirectly invalidated by:
[debug] product: Set()
[debug] binary dep: Set()
[debug] external source: Set()
[debug] All initially invalidated sources: Set()
[debug] Copy resource mappings:
[debug]
[debug]
[debug] Initial source changes:
[debug] removed:Set()
[debug] added: Set()
[debug] modified: Set()
[debug] Removed products: Set()
[debug] Modified external sources: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set()
[debug]
[debug] Sources indirectly invalidated by:
[debug] product: Set()
[debug] binary dep: Set()
[debug] external source: Set()
[debug] All initially invalidated sources: Set()
[debug] Copy resource mappings:
[debug] (/Users/haoyi/Dropbox (Personal)/Workspace/scalatags/js/src/test/resources/jade.js,/Users/haoyi/Dropbox (Personal)/Workspace/scalatags/js/target/scala-2.11/test-classes/jade.js)
[debug] (/Users/haoyi/Dropbox (Personal)/Workspace/scalatags/js/src/test/resources/mustache.js,/Users/haoyi/Dropbox (Personal)/Workspace/scalatags/js/target/scala-2.11/test-classes/mustache.js)
[debug] Framework implementation 'org.scalacheck.ScalaCheckFramework' not present.
[debug] Framework implementation 'org.specs2.runner.Specs2Framework' not present.
[debug] Framework implementation 'org.specs2.runner.SpecsFramework' not present.
[debug] Framework implementation 'org.specs.runner.SpecsFramework' not present.
[debug] Framework implementation 'org.scalatest.tools.Framework' not present.
[debug] Framework implementation 'org.scalatest.tools.ScalaTestFramework' not present.
[debug] Framework implementation 'com.novocode.junit.JUnitFramework' not present.
[debug] Subclass fingerprints: List((utest.framework.TestSuite,true,utest.runner.GenericTestFramework$$anon$1@61bb1e3e))
[debug] Annotation fingerprints: List()
[debug] Running TaskDef(scalatags.BasicTests, utest.runner.GenericTestFramework$$anon$1@61bb1e3e, false, [SuiteSelector])
[debug] Running TaskDef(scalatags.JsDomTests, utest.runner.GenericTestFramework$$anon$1@61bb1e3e, false, [SuiteSelector])
[debug] Running TaskDef(scalatags.PerfTests, utest.runner.GenericTestFramework$$anon$1@61bb1e3e, false, [SuiteSelector])
[debug] Running TaskDef(scalatags.ExampleTests, utest.runner.GenericTestFramework$$anon$1@61bb1e3e, false, [SuiteSelector])
HELLO WORLD
HELLO WORLD 2 [object Object]
SyntaxError: Parse error

1
SyntaxError: Parse error

SyntaxError: Parse error

SyntaxError: Parse error

SyntaxError: Parse error

SyntaxError: Parse error

SyntaxError: Parse error

SyntaxError: Parse error

SyntaxError: Parse error

SyntaxError: Parse error

SyntaxError: Parse error

SyntaxError: Parse error

SyntaxError: Parse error

ReferenceError: Can't find variable: PlatformShims

  file:///var/folders/xw/4lw_p32d0pg88hyg5rfn7vqxqhkgj_/T/phantomjs-launcher-webpage640338580598556462.html:337044

Haoyi Li

unread,
Jun 4, 2014, 2:59:10 AM6/4/14
to Sébastien Doeraene, scal...@googlegroups.com
Well, turns out that while test-only and fastOptStage::test-only and fullOptStage::test-only don't work for this project in PhantomJS (but they work great in NodeJS, FWIW) packageStage::test-only works perfectly! Woohoo!

Sorry for the stream of consciousness posting and many emails. I'm just posting what I discover as I explore this strange land.

Anyway, even though it works, it's probably worth figuring out why those other commands are blowing up so we can fix them

Sébastien Doeraene

unread,
Jun 4, 2014, 3:05:20 AM6/4/14
to Haoyi Li, scal...@googlegroups.com

OK thanks. It's probably going to be work for Tobias when he's back from vacation. He is the master of all the running and testing infrastructure.

Cheers,
Sébastien

Anton Kulaga

unread,
Jun 4, 2014, 5:43:54 AM6/4/14
to scal...@googlegroups.com, sjrdo...@gmail.com
> (I'm building a version of Scalatags that generates a dom.HTMLElment instead of a String

Cool, actually having everything as dom elements (instead of strings that are hard to deal with) was one of the main things that I was lacking in scalatags

Benjamin Jackman

unread,
Jun 4, 2014, 11:00:03 AM6/4/14
to scal...@googlegroups.com, sjrdo...@gmail.com
+1


</
...
Reply all
Reply to author
Forward
0 new messages