27 Jan 2023 |
Aly | Can you share how you're including the dependencies in your build file | 01:50:38 |
beees | In my build.sbt
lazy val root = project
.in(file("."))
.enablePlugins(BuildInfoPlugin, LambdaJSPlugin, Smithy4sCodegenPlugin)
.settings(
scalaVersion := "3.2.1",
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-effect" % "3.4.5",
"org.http4s" %%% "http4s-ember-client" % "0.23.18",
// logging
"com.company.name" %%% "logging-core" % "0.0.17",
)
) | 01:54:24 |
Aly | How about in logging-core ? | 01:55:32 |
beees | lazy val loggingCore = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("core"))
.settings(commonSettings)
.settings(
name := "logging-core",
libraryDependencies += catsCore.value,
libraryDependencies += catsEffect.value,
libraryDependencies += catsKernel.value,
libraryDependencies += catsEffectKernel.value,
libraryDependencies += catsMTL.value,
libraryDependencies += circeCore.value,
) | 01:56:46 |
Aly | Hmm ok | 01:57:08 |
beees | Where each dependency is
object Dependencies {
lazy val catsKernel = Def.setting("org.typelevel" %%% "cats-kernel" % Versions.cats)
... | 01:57:26 |
Aly | If you root/dependencyTree does it show you the offender pulling in JVM fs2? | 01:57:34 |
beees | Oh good idea. Looks like a lot of output so I'll investigate, thanks! | 02:00:19 |
Aly | You should be able to search for io_3 being imported by something that's sjs1_3 | 02:00:53 |
beees | Hmm, looks like an http4s lib... | 02:01:58 |
beees | Oh no. I think we did miss changing a %% to %%% 🤦 | 02:03:17 |
beees | Good looking out! | 02:03:29 |
Aly | 🥳 | 02:05:02 |
beees | Yes! Was able to compile after another publishLocal , thanks! That's probably the #1 error here isn't it 😅 | 02:07:51 |
Aly | So common we have https://sca.la/percent for it ;P | 02:08:10 |
beees | 💯 | 02:09:07 |
beees | That's amazing. | 02:09:10 |
| michal.przysucha joined the room. | 12:40:08 |
arne#2177 | how do I compile my throwaway /tmp/scratch.scala to javascript when experimenting? | 13:29:31 |
arne#2177 | I could not find documentation for a scalac equivalent to compile my single file throw away hello world program | 13:30:11 |
gzm0#3662 | there is a cli, but its not easy to use (you need to compile and link). | 13:37:30 |
gzm0#3662 | much easier to just dump the 2 boilerplate files into /tmp/ to configure sbt and then run sbt. | 13:37:48 |
gzm0#3662 | basically the stuff here: https://www.scala-js.org/doc/tutorial/basic/ | 13:38:46 |
WiseTree#5397 | You could use scala-cli for that, e.g.
potato.sc :
//> using platform "scala-js"
println("hello")
$ scala-cli run potato.sc
Downloading Scala.js CLI
Compiling project (Scala 3.2.0, Scala.js)
Compiled project (Scala 3.2.0, Scala.js)
hello
$ scala-cli package potato.sc
Compiling project (Scala 3.2.0, Scala.js)
Compiled project (Scala 3.2.0, Scala.js)
Wrote /home/dpol/temp/potato.js, run it with
node ./potato.js
$ node ./potato.js
hello | 13:46:54 |
gzm0#3662 | oh, nice, I didn't know that. | 13:56:38 |
| polux joined the room. | 16:14:26 |
ekrich#7695 | Is the minimum sbt for Scala.js, scripted etc. still 1.1.6? | 16:36:02 |
sjrd#7815 | We only test with 1.3.x+ nowadays, but we still compile against the 1.0.0 API. 🤷♂️ | 17:20:14 |
sjrd#7815 | For cross project you need 1.2.x+, though | 17:20:45 |
ekrich#7695 | Thanks, for the info. | 23:29:47 |