!oXgwMHWllugcPDSKTb:matrix.org

sbt

2087 Members
Scala Build Tool5 Servers

Load older messages


SenderMessageTime
16 May 2024
@_discord_659458872486002691:t2bot.iofelher#6050 Just need the tests 16:27:42
@_discord_583167330566275072:t2bot.ioSethTisue#7418 if it's just running the tests, sbt-projectmatrix seems like overkill to me 16:27:44
@_discord_583167330566275072:t2bot.ioSethTisue#7418 especially if n is large-ish (like closer to 10 than 2), since your build will start taking forever to load 16:28:11
@_discord_659458872486002691:t2bot.iofelher#6050 Okay, then I'll just put a .sh script into my repo to run the tests against different versions of the library. 16:28:28
@_discord_659458872486002691:t2bot.iofelher#6050 Thanks 16:28:29
@_discord_644849095785054218:t2bot.iobjornregnell It seems like a general use case though, so writing and publishing an sbt plugin might be a nice contribution.... 16:28:39
@_discord_583167330566275072:t2bot.ioSethTisue#7418 it would be interesting to see what the custom command to do it looks like. because if it's only a few lines, maybe it would be fine to just have it exist as a code example rather than a whole plugin? not sure 16:29:23
@_discord_644849095785054218:t2bot.iobjornregnell
a whole plugin?

I have never written an sbt plugin but from the docs, if the logic is simple it should be a simple plugin...
16:30:38
@_discord_659458872486002691:t2bot.iofelher#6050 Yeah, sadly my SBT-foo is really not that great. So a plugin is more or less out of the question. Defining some task to do it inside the build seems feasable. Not sure it is better than to .sh it. 16:30:48
@_discord_659458872486002691:t2bot.iofelher#6050 * Yeah, sadly my SBT-foo is really not that great. So a plugin is more or less out of the question. Defining some task to do it inside the build seems feasable. Not sure it is better than to .sh it, though 16:31:07
@_discord_644849095785054218:t2bot.iobjornregnell If you look att the "Obfuscate" example plugin here https://www.scala-sbt.org/1.x/docs/Plugins.html then it does not look that scary. But maybe I'm too optimistic 🤷‍♂️ 16:32:29
@_discord_644849095785054218:t2bot.iobjornregnell In a plugin compared to normal settings DSL you have the sanctuary of "normal" scala 2 and the process api of sbt seems reasonable. 16:33:44
@_discord_644849095785054218:t2bot.iobjornregnell * In a plugin (in contrast to tyhe magic settings DSL) you have the sanctuary of "normal" scala 2 and the process api of sbt seems reasonable. 16:34:11
@_discord_644849095785054218:t2bot.iobjornregnell * In a plugin (in contrast to the magic settings DSL) you have the sanctuary of "normal" scala 2 and the process api of sbt seems reasonable. 16:34:30
@_discord_659458872486002691:t2bot.iofelher#6050 Interesting. I find that extremely hard to read. I suppose it is way easier if you already have a very firm grasp on all the SBT conecpts, like tasks, definitions, scopes, etc. 16:41:01
@_discord_644849095785054218:t2bot.iobjornregnell But yeah; the whole multi-dimensional settings thing is there so perhaps it's too much fuzz trying to fiddle with settings etc. My thinking is that there is this way of setting the scala version dynamically in the shell so it should be possible, but I guess making it a scala-cli script that mutates your build.sbt file is a much quicker ("uggly" but effectful) hack... 16:42:50
@_discord_639859187773603841:t2bot.ioMatthias Berndt#5019 Setting the Scala version in sbt is trivial, set Scala version := "3.3.3" 17:15:39
@_discord_639859187773603841:t2bot.ioMatthias Berndt#5019 * Setting the Scala version in sbt is trivial, set scalaVersion := "3.3.3" 17:15:56
@_discord_639859187773603841:t2bot.ioMatthias Berndt#5019 It's probably best to use sbt --client for this 17:16:29
@_discord_639859187773603841:t2bot.ioMatthias Berndt#5019 * Setting the Scala version in the sbt shell is trivial, set scalaVersion := "3.3.3" 17:16:42
@_discord_839723269250875422:t2bot.iomtomko I would like to override a task (main/Docker/publish) in sbt so that it sets the scala version first. My build has something like:
lazy val scala3 = "3.3.3"
(main / Docker / publish) := {
  // ?? what goes here to select the value of $scala3?
  (main/Docker/publish).value
}
17:36:28
@_discord_845013677816021083:t2bot.ioarmanbilge#6192 if I understand you correctly, that's not possible 17:37:07
@_discord_845013677816021083:t2bot.ioarmanbilge#6192 tasks cannot assing values to settings 17:37:13
@_discord_845013677816021083:t2bot.ioarmanbilge#6192 * tasks cannot assign values to settings 17:37:22
@_discord_845013677816021083:t2bot.ioarmanbilge#6192 you could create a command alias that assigns a value to a setting and then runs a task 17:37:32
@_discord_839723269250875422:t2bot.iomtomko cross-compiling is no fun 17:37:36
@_discord_839723269250875422:t2bot.iomtomko that might be enough. Otherwise our build node is going to have to run the task in the context of that setting, like ++3.3.3 main/Docker/publish which I don't want because I don't want it to have to figure out what version of Scala 3 we're currently using. 17:38:31
@flamengo2024:matrix.org@flamengo2024:matrix.org joined the room.17:39:19
@flamengo2024:matrix.org@flamengo2024:matrix.org left the room.17:40:02
@_discord_845013677816021083:t2bot.ioarmanbilge#6192 you can just write ++3 17:47:02

Show newer messages


Back to Room ListRoom Version: 9