!EHpcRyNJdgGtwsEwtl:matrix.org

Scala CLI

416 Members
Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!) scala-cli.virtuslab.org4 Servers

Load older messages


SenderMessageTime
4 Jan 2024
@_discord_594749312123142149:t2bot.ioQuafadas#7582 * Well, I tried the stack trace flag, but didnt change anything. I'll pause this for now. 20:24:07
6 Jan 2024
@_discord_583167330566275072:t2bot.ioSethTisue#7418 I replied with a doc link 15:52:03
@_discord_154558903290560512:t2bot.ioJD557#8432 It might be worth to link that question in https://github.com/VirtusLab/scala-cli/discussions/1794 15:52:58
@_discord_154558903290560512:t2bot.ioJD557#8432 Even with the docs, I think that the package defaults can be a bit confusing 15:53:36
7 Jan 2024
@_discord_583167330566275072:t2bot.ioSethTisue#7418 it's a reasonable feature request, but it's not straightforward to implement since scala-cli is basically just a launcher. by default it launches the stock REPL and the stock REPL does not have this feature

you can launch the Ammonite REPL instead with scala-cli --power repl --amm — Ammonite has this feature, but the syntax is different, some import $ivy... thing
18:31:53
@_discord_583167330566275072:t2bot.ioSethTisue#7418 would be a good Google Summer of Code project this year, maybe. though if someone wants to tackle it sooner than that, please do 🙂 18:33:40
9 Jan 2024
@_discord_448877036098813952:t2bot.iololgab#6138 The whole point behind build tools like scala-cli and bleep is the fact that the build is data (directives or yaml) and not scala code. If you need to run some scala code to manipulate the build programmatically, isn't it better to just use a build tool with the build as code, like sbt or mill? 10:45:26
@_discord_594749312123142149:t2bot.ioQuafadas#7582 I've been struggling with scaladoc, and tracked it back to, what I believe to be a rather odd looking bug.

I have this code, in a file called ext.scala

package vecxt

export Retentions.*

object Retentions:
    opaque type Retention = Double
    extension (x: Retention)
        inline def retention: Double = x
end Retentions

This command, works.
scala-cli doc ext.scala -o scaladoc -f
and produces, as advertised, a website with documentation, for this glorious functionality.

Now, if I rename the file, to be this,
ext.retention.scala

Then scaladoc falls over...

simon@Simons-Mac-mini scaladoc % scala-cli doc ext.retention.scala -o scaladoc -f
Compiling project (Scala 3.3.1, JVM (21))
Compiled project (Scala 3.3.1, JVM (21))
class vecxt.ext.retention$package cannot be unpickled because no class file was found for denot: val <none>
1 error found
[error]  Scaladoc generation failed (exit code: 1)

My claim, is that the file rename, is tripping up scaladoc? Could this be the case?
16:08:51
@_discord_594749312123142149:t2bot.ioQuafadas#7582 * I've been struggling with scaladoc, and tracked it back to, what I believe to be a rather odd looking bug.

I have this code, in a file called ext.scala

package vecxt

export Retentions.*

object Retentions:
    opaque type Retention = Double
    extension (x: Retention)
        inline def retention: Double = x
end Retentions

This command, works.
scala-cli doc ext.scala -o scaladoc -f
and produces, as advertised, a website with documentation, for this glorious functionality.

Now, if I rename the file, to be this,
ext.retention.scala

Then scaladoc falls over...

simon@Simons-Mac-mini scaladoc % scala-cli doc ext.retention.scala -o scaladoc -f
Compiling project (Scala 3.3.1, JVM (21))
Compiled project (Scala 3.3.1, JVM (21))
class vecxt.ext.retention$package cannot be unpickled because no class file was found for denot: val <none>
1 error found
[error]  Scaladoc generation failed (exit code: 1)

My claim, is that the file rename, is tripping up scaladoc? Ohh. I tyhink i tried it in mill and got the same... so I'm thinking this is not a scala-cli thing, and i'm posting in the wrong channel... hmm... would this be a scala compiler thing?
16:10:32
10 Jan 2024
@_discord_510415959480336393:t2bot.ioPotatoe<T + Hobby> changed their profile picture.11:33:01
12 Jan 2024
@_discord_945331330294624276:t2bot.ioZhao Nan changed their display name from Zhao Nan to zhao_nan.17:01:58
@_discord_231350810565410817:t2bot.ioragnar#4252 changed their display name from ragnar#4252 to ragnar.21:32:24
13 Jan 2024
@_discord_967195426275065976:t2bot.ioOSE changed their display name from OSE to ose_369.00:42:10
14 Feb 2024
@nrktkt:matrix.orgnrktkt!discord bridge 632150470000902164 90115302163808266017:28:44
@_discord_bot:t2bot.ioDiscord BridgeI'm asking permission from the guild administrators to make this bridge.17:31:34
@nrktkt:matrix.orgnrktktchanged room power levels.17:32:28
@_discord_bot:t2bot.ioDiscord Bridge

Timed out waiting for a response from the Discord owners.

17:36:35
1 May 2024
@rom1dep:kde.orgrom1dep[m] changed their display name from rom1dep to rom1dep[m].16:04:52
7 May 2024
@rom1dep:kde.orgrom1dep[m] hey there, I'm pretty sure I'm holding it wrong but this has been puzzling me. I have this single-file test project which I want to compile using native-image.
I have the directive: //> using jvm graalvm-java21 on top of my file
For some reason, when trying to run package on it, I'm getting:
Fatal error: java.lang.UnsupportedClassVersionError: test has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
I tried removing the .scala-build folder, and when subsequently running scala-cli , it does print those lines:
Compiling project (Scala 3.4.1, JVM (graalvm-java21)) Compiled project (Scala 3.4.1, JVM (graalvm-java21))
but the class file version error arises shortly after nonetheless.
10:02:56
@rom1dep:kde.orgrom1dep[m] I don't have a $JAVA_HOME defined, nor a native-image in my $PATH 10:07:54
@rom1dep:kde.orgrom1dep[m] AHA, I figured I have to specify --graalvm-jvm-id , I was wrong to assume that scala-cli would pick a native-image version that matches with my specified jvm 13:09:52
29 May 2024
@tobiasroeser:matrix.orgTobias RoeserIs this brigde up-to-date?10:51:13
@tobiasroeser:matrix.orgTobias Roeser nrktkt: ? 10:51:28
4 Jun 2024
@rom1dep:kde.orgrom1dep[m] ping! 13:08:11
@rom1dep:kde.orgrom1dep[m] is it possible to use scala-cli from a jupyter notebook? 13:10:37
24 Jul 2024
@identity:matrix.orgidentity joined the room.16:38:38
@identity:matrix.orgidentity

From the scala-cli docs' using directive reference:
//> using platform (jvm|scala-js|js|scala-native|native)+

Where is the difference between scala-native and native? Is the latter graalvm's native-image tool?

21:49:15
@identity:matrix.orgidentity And now I see, there is also js in addition to scala-js. What's that? 21:50:34
26 Jul 2024
@crater2150:qwertyuiop.decrater2150
In reply to @identity:matrix.org

From the scala-cli docs' using directive reference:
//> using platform (jvm|scala-js|js|scala-native|native)+

Where is the difference between scala-native and native? Is the latter graalvm's native-image tool?

looking at the source code, it looks like it's just aliases, i.e. scala-js and js is the same
14:47:20
19 Oct 2024
@nrktkt:matrix.orgnrktkt
In reply to @tobiasroeser:matrix.org
Is this brigde up-to-date?
I clearly don't check this channel often 😅. but it appears to have gotten unbridged in the great t2bot unbridging :(
20:42:24

Show newer messages


Back to Room ListRoom Version: 9