!oXgwMHWllugcPDSKTb:matrix.org

sbt

2087 Members
Scala Build Tool5 Servers

Load older messages


SenderMessageTime
24 Mar 2022
@_discord_583167330566275072:t2bot.ioSethTisue#7418 I don't think there's any way to put them anywhere else. (you can also put code in project/*.scala, but that code has to be called from an .sbt file at the root level) 16:13:16
@_discord_583167330566275072:t2bot.ioSethTisue#7418 * hard to be 100% sure about a negative, I don't think there's any way to put them anywhere else. (you can also put code in project/*.scala, but that code has to be called from an .sbt file at the root level) 16:13:30
@_discord_583167330566275072:t2bot.ioSethTisue#7418 * hard to be 100% sure about a negative, but I've never heard of there being any way to put them anywhere else. (you can also put code in project/*.scala, but that code has to be called from an .sbt file at the root level) 16:13:41
@_discord_583167330566275072:t2bot.ioSethTisue#7418 * hard to be 100% sure about a negative, but I've never heard of there being any way to put them anywhere else. (you can also put code in project/*.scala, but that code has to ultimately be called from an .sbt file at the root level) 16:13:52
@_discord_349350939766947853:t2bot.ioDan | ohkeycaps.com#6915 so I could have a file project/aliases.sbt, and call it from build.sbt? 16:17:55
@_discord_349350939766947853:t2bot.ioDan | ohkeycaps.com#6915 ragnar and how do you call that file from build.sbt? 16:47:56
@_discord_231350810565410817:t2bot.ioragnar#4252 joined the room.16:49:43
@_discord_231350810565410817:t2bot.ioragnar#4252 Dan | ohkeycaps.com the .scala files are just normal scala files compiled together with your project. So if they contain an object Aliases then in your build you can do import Aliases._. 16:49:44
@_discord_349350939766947853:t2bot.ioDan | ohkeycaps.com#6915 Ah ok 16:50:03
@_discord_231350810565410817:t2bot.ioragnar#4252 Dan | ohkeycaps.com because they are just normal scala files, you may want to consider the following imports if you use any of the SBT stuff:
import sbt.Keys._
import sbt._
16:52:41
@_discord_349350939766947853:t2bot.ioDan | ohkeycaps.com#6915 ^ true I've seen that in sbt files before. 16:53:05
@_discord_231350810565410817:t2bot.ioragnar#4252 I think in .sbt files those imports are added automatically … kinda. 16:53:46
@_discord_777499506895093780:t2bot.iombesida joined the room.17:46:25
@_discord_777499506895093780:t2bot.iombesida When I do publishLocal on a project with SNAPSHOT version, first time it performs well, second time it warns that I have to manually delete already existing version from ~/.ivy2/local location. Is it an expected benhaviour? I find it cumbersome each time to go to that location and delete it manually. Maybe sbt has some commands to automate that? 17:46:26
@_discord_349350939766947853:t2bot.ioDan | ohkeycaps.com#6915 Hm I thought that it would override the existing one, especially since it is a snapshot 17:54:33
@_discord_905558437344190566:t2bot.ioagustinpereyra87 joined the room.17:57:32
@_discord_758905454075707442:t2bot.iozzyzzyxx#4150 joined the room.18:01:28
@_discord_758905454075707442:t2bot.iozzyzzyxx#4150 you can set isSnapshot := true 18:01:28
@_discord_777499506895093780:t2bot.iombesida thanks, that works 18:20:07
@_discord_777499506895093780:t2bot.iombesida appears that it doesn't care about version at all, unless you set isSnapshot := true 18:20:11
@_discord_777499506895093780:t2bot.iombesida * appears that it doesn't care about version at all, unless you set isSnapshot := true 18:20:14
@_discord_758905454075707442:t2bot.iozzyzzyxx#4150 it has this code internally
    isSnapshot := (isSnapshot or version(_ endsWith "-SNAPSHOT")).value,
18:20:18
@_discord_758905454075707442:t2bot.iozzyzzyxx#4150 but that's in ivyBaseSettings, so maybe it only matters if you are publishing ivy-style 18:20:45
@_discord_758905454075707442:t2bot.iozzyzzyxx#4150 * but that's in ivyBaseSettings, so maybe it only matters if you are publishing ivy-style vs maven-style? 18:21:56
@_discord_777499506895093780:t2bot.iombesida I didn't set any special settings regarding publishing. My sbt version is 1.6.2. And what are the defaults, maven-style? 18:23:02
@_discord_758905454075707442:t2bot.iozzyzzyxx#4150 ah just found
publishLocalConfiguration := publishConfig(
      false, //publishMavenStyle.value,
      deliverPattern(crossTarget.value),
      if (isSnapshot.value) "integration" else "release",
      ivyConfigurations.value.map(c => ConfigRef(c.name)).toVector,
      (publishLocal / packagedArtifacts).value.toVector,
      (publishLocal / checksums).value.toVector,
      logging = ivyLoggingLevel.value,
      overwrite = isSnapshot.value
    )

which looks like it's forced to ivy-style, and should respect the version ending in -SNAPSHOT
18:27:40
@_discord_758905454075707442:t2bot.iozzyzzyxx#4150 * ah just found
publishLocalConfiguration := publishConfig(
      false, //publishMavenStyle.value,
      deliverPattern(crossTarget.value),
      if (isSnapshot.value) "integration" else "release",
      ivyConfigurations.value.map(c => ConfigRef(c.name)).toVector,
      (publishLocal / packagedArtifacts).value.toVector,
      (publishLocal / checksums).value.toVector,
      logging = ivyLoggingLevel.value,
      overwrite = isSnapshot.value
    )

which looks like publishLocal forces ivy-style, and should respect the version ending in -SNAPSHOT
18:27:58
@_discord_758905454075707442:t2bot.iozzyzzyxx#4150 any chance you didn't have the hyphen, or had something else after SNAPSHOT? 18:28:47
@_discord_777499506895093780:t2bot.iombesida yeah, I just set version := "SNAPHSOT" 18:30:25
@_discord_777499506895093780:t2bot.iombesida * yeah, I just set version := "SNAPSHOT" 18:30:48

Show newer messages


Back to Room ListRoom Version: 9