Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 29 08:35
    @sjrd banned @8bitpitRBX_twitter
  • May 23 13:44
    @sjrd banned @BIGCRYPTO001_gitlab
  • May 01 14:31
    @sjrd banned @Certificates1_gitlab
  • Apr 22 15:31
    @sjrd banned @lerbatax
  • Jan 31 23:04
    sjrd commented #3555
  • Jan 31 22:56
    sjrd review_requested #3555
  • Jan 31 22:56
    sjrd opened #3555
  • Jan 31 21:06

    sjrd on 0.6.x

    Remove dead code: specific coll… Adapt the signature of `js.Arra… Merge pull request #3554 from s… (compare)

  • Jan 31 21:06
    sjrd closed #3554
  • Jan 31 20:54
    erikvanoosten commented #2665
  • Jan 31 16:33
    sjrd commented #3538
  • Jan 31 15:54

    sjrd on master

    Fix analyzer cycle detection to… Add toString methods to analyze… Do not provide linked ClassInfo… and 1 more (compare)

  • Jan 31 15:54
    sjrd closed #3552
  • Jan 31 15:54

    sjrd on master

    Remove Logger.success It is un… Make level helpers final Clean-up ScalaConsoleLogger cod… and 1 more (compare)

  • Jan 31 15:54
    sjrd closed #3553
  • Jan 31 15:33
    sjrd commented #2665
  • Jan 31 15:30
    erikvanoosten commented #2665
  • Jan 31 10:41
    sjrd review_requested #3554
  • Jan 31 10:41
    sjrd opened #3554
  • Jan 31 10:05
    gzm0 synchronize #3552
Anthony Cerruti
@srnb_gitlab
You can merge a dictionary and a literal
Sébastien Doeraene
@sjrd
It's a scalac limitation. Even backticked keys are mangled by the typer before they can be intercepted by Scala.js in literals. It's a won't fix bug.
Does ScalaJS 1.x export to exports or module.exports?
It exports to exports
Anthony Cerruti
@srnb_gitlab
Ok
That's fine
Sébastien Doeraene
@sjrd
But you have access to module with js.Dynamic.global.module in 1.x.
Anthony Cerruti
@srnb_gitlab
My only worry to get past now is fs2 not interacting properly between two different node modules
Sébastien Doeraene
@sjrd
So you can manipulate however you like in a main method.
You mean Scala classes compiled in two different JavaScript modules through two separate projects? They won't be compatible.
Anthony Cerruti
@srnb_gitlab
:weary:
So I'll have to make an extra module that I import using facades?
Sébastien Doeraene
@sjrd
Yes, I guess.
Anthony Cerruti
@srnb_gitlab
:weary:
Mustafa Kuscu
@mcku
just realized that js.Dynamic.literal("a-b"->1) appears to be equivalent to js.Dynamic.literal(`a-b`=1) :)
Anthony Cerruti
@srnb_gitlab
You can try "\"a-b\"" -> 1 maybe?
Mustafa Kuscu
@mcku
Anthony Cerruti
@srnb_gitlab
The third one is the behavior you want right?
Mustafa Kuscu
@mcku
Yep
Anthony Cerruti
@srnb_gitlab
Nice
And you're sure you don't want Dictionary
Mustafa Kuscu
@mcku
I don't know. dictionary is good for accessing object properties, but imho literal is good for the construction part.
Anthony Cerruti
@srnb_gitlab
Well you're constructing a literal here the same way you'd construct a dictionary
Eric K Richardson
@ekrich
@sjrd In regards to the PR I am working on I had a couple of questions if you have time.
Sébastien Doeraene
@sjrd
I can spare some time now, but let's move it to https://gitter.im/scala-js/scala-js/contrib
Eric K Richardson
@ekrich
Ok, didn't know about that room.
Marc Grue
@marcgrue
Thanks for the suggestions, @jhegedus42. I can run tests from the sbt shell inside IntelliJ but the debug window shows nothing, argh. Probably some silly simple setting somewhere. Probably easier to solve with 4 eyes sitting by my computer...
jhegedus42
@jhegedus42
@marcgrue u need to attach the debugger to sbt
press that green bug button on the left
image.png
this one ^
that did the trick for me
also, try to set a breakpoint in the code somewhere, where it runs... that helps to bring up those debug windows
if the debugger is attached to the JVM process ( that should happen by pressing the green bug button )
Marc Grue
@marcgrue
I did all that. But the debug window doesn’t show anything :-(
Andrzej Sołtysik
@asoltysik
Is there a way to run tests when exporting the project as ESModule? Im getting Could not run test MainSpec: org.scalajs.testcommon.RPCCore$RPCException: scala.scalajs.js.JavaScriptException: TypeError: Cannot read property 'MainSpec' of undefined. I stumbled upon this thread: https://www.reddit.com/r/scala/comments/c84rae/unit_testing_in_scalajs/ but the solutions proposed there don't change anything for me
version is 0.6.28
Sébastien Doeraene
@sjrd
The settings will have to be in the .settings() (resp. .jsSettings()) of the relevant project (resp. crossProject)
Andrzej Sołtysik
@asoltysik
that's what I did, will try that again though
Øyvind Raddum Berg
@oyvindberg
@marcgrue I managed to run and debug my shared tests in the end in intellij. Somehow it works when running all tests in package, as opposed to running a single test. This was with utest.
Andrzej Sołtysik
@asoltysik
@sjrd it worked when i upgraded scalatest from 3.0.5 to 3.0.8
Adam Fraser
@adamgfraser
Hi. I'm trying to set global.process.exitcode to a non-zero value and then allow my program to exit gracefully. I am expecting to exit with a failure in that case but I am still exiting with a success. I have confirmed that I am using the node.js environment. Am I doing something wrong?
Frank P. Tominc
@franktominc
Hey guys, I'm having a weird behavior here. I'm trying to pass command-line arguments to a scalajs script and for some reason it doesn't work. What am I missing here?
@JSExportAll
@JSExportTopLevel("Main")
object Main {
  def main(args: Array[String]): Unit = {
    println("abc")
    args.foreach(println)
  }
}
node my-script-opt.js 3123 12312 12312312 3123123 12321312 1231231 12312312 123123
abc
aappddeevv
@aappddeevv
I think you need to use the process.argv value to access them.
Sébastien Doeraene
@sjrd
@franktominc The args of def main are always an empty array in Scala.js. The existence of the parameter is only there for reasonable compatibility with Scala/JVM. As @aappddeevv said, use Node.js' process.argv value to read command-line arguments.
Frank P. Tominc
@franktominc
Oh, so I need a MainJS and a MainJVM?
Sébastien Doeraene
@sjrd
Ah, yes, I'm afraid so.