-
Notifications
You must be signed in to change notification settings - Fork 8
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
Publish via coursier? #38
Comments
I have at least a sort of proof of concept that coursier could entirely replace our assembly scripts. From an empty directory, the following sequence of commands can produce and run a $ mkdir bin $ cat > foo.scala <<'EOF'
object Foo {
def main(args: Array[String]): Unit = {
println(s"asdf ${1 + 1}")
new A
}
class A
}
EOF $ cs launch --scala 2.12.15 scalac:2.12.15 -- -classpath "$(cs fetch --scala 2.12.15 --intransitive org.scala-js::scalajs-library:1.7.1)" "-Xplugin:$(cs fetch --scala 2.12.15 --intransitive org.scala-js:scalajs-compiler_2.12.15:1.7.1)" -d bin foo.scala $ cs launch org.scala-js:scalajs-cli_2.13:1.0.0 org.scala-js:scalajs-linker_2.13:1.7.1 -M org.scalajs.cli.Scalajsp -- bin/Foo\$.sjsir
module class Foo$ extends java.lang.Object {
def main;[Ljava.lang.String;V(args: java.lang.String[]) {
mod:scala.Predef$.println;Ljava.lang.Object;V(("asdf " +[string] 2));
new Foo$A().<init>;V()
}
constructor def <init>;V() {
this.java.lang.Object::<init>;V();
mod:Foo$<-this
}
} $ cs launch org.scala-js:scalajs-cli_2.13:1.0.0 org.scala-js:scalajs-linker_2.13:1.7.1 -M org.scalajs.cli.Scalajsp -- bin/Foo\$A.sjsir
class Foo$A extends java.lang.Object {
constructor def <init>;V() {
this.java.lang.Object::<init>;V()
}
} $ cs launch --scala 2.13.6 org.scala-js::scalajs-cli:1.0.0 org.scala-js::scalajs-linker:1.7.1 -M org.scalajs.cli.Scalajsld -- -s -o test.js -mm Foo.main "$(cs fetch --scala 2.12.15 --intransitive org.scala-js::scalajs-library:1.7.1)" bin $ node test.js
asdf 2 |
FWIW: This seems to be the chain of forks of this repo that eventually leads into Scala CLI. https://github.com/scala-cli/scala-js-cli |
Follow-up from #35 (comment)
The text was updated successfully, but these errors were encountered: