Jimmy
08/05/2021, 8:22 AMthdxr
08/05/2021, 10:42 AMJimmy
08/05/2021, 8:37 PMthdxr
08/05/2021, 8:39 PMthdxr
08/05/2021, 8:40 PMJimmy
08/05/2021, 9:05 PMFrank
Frank
Pål Brattberg
08/26/2021, 7:56 AMJimmy
08/26/2021, 8:05 AMwhat commands are you running to build ur Java lambdas?we currently only have scala lambdas, and it differ from Java up until the JAR is produced, then it’s handled just like any Java JAR. Like Pål says we use SBT to both build our Scala projects (though no gradle in there atm) and handle the package management for them. Builds are done within docker containers with the proper scala and sbt versions
Jimmy
08/26/2021, 8:06 AMJimmy
08/26/2021, 8:07 AMsbt assembly
which produces a JARJimmy
08/26/2021, 8:07 AMFrank
Jimmy
08/26/2021, 5:09 PMFrank
Jimmy
08/26/2021, 5:10 PMJimmy
08/26/2021, 5:12 PMJimmy
08/26/2021, 5:12 PMJimmy
08/26/2021, 5:13 PMFrank
sst start
tries to build your function code live as you are developing. So it’d be much faster to do it natively on ur machine.Frank
Jimmy
08/26/2021, 5:15 PMFrank
Jimmy
08/26/2021, 5:16 PMFrank
Jimmy
08/26/2021, 5:17 PMJimmy
08/26/2021, 5:18 PMFrank
Frank
Jimmy
08/26/2021, 5:22 PMJimmy
08/26/2021, 5:23 PMJimmy
08/26/2021, 5:24 PMFrank
Jimmy
08/26/2021, 5:25 PMFrank
Jimmy
08/26/2021, 5:26 PMJimmy
08/26/2021, 5:26 PMJimmy
08/26/2021, 5:28 PMFrank
sst start
then runs ur code with it; and sends the response back as a websocket message again.Frank
Jimmy
08/26/2021, 5:30 PMFrank
Frank
sbt package
be used instead of sbt assembly
to build the JAR? I’m trying out the scala-sam-app.sbt assembly
generated a 12MB JAR. sbt package
generated a 16KB JAR, and also runs faster.Jimmy
08/30/2021, 9:44 AMsbt package
only generates a JAR for your code, so any dependencies won’t be include, whereas sbt assembly
createas a “fat jar” with all dependencies baked in. Since Lambda wants a (one) JAR for the JVM Lambda you need a fat jar, and otherwise you’d still need to include the other library JAR’sJimmy
08/30/2021, 9:44 AMFrank
sbt assembly
take for your project?
2. are all of your Lambdas in the same sbt
project? Or 1 sbt
project per Lambda?Jimmy
08/30/2021, 8:21 PMJimmy
08/30/2021, 8:23 PMJimmy
08/30/2021, 8:24 PMFrank
sst start
currently restarts the language runtime. If we were to keep sbt
running, do we need to have multiple sbt
processes running, 1 for each service?Jimmy
08/31/2021, 4:18 AMFrank
Frank
sbt 'set assemblyOutputPath in assembly := new File("/path/to/project/build/index.jar")' "set test in assembly := {}" assembly
On windows, I can’t seem to be able to escape the "
or the )
inorder to set the assemblyOuputPath
. I tried this:
sbt "set assemblyOutputPath in assembly := new File(""/path/to/project/build/index.jar"")" "set test in assembly := {}" assembly
And I’m getting the error:
set was unexpected at this time.
Frank
Jimmy
09/03/2021, 11:51 AMFrank
Tomasz Sobczyk
09/24/2021, 8:45 PM