From f86df62aafce719d2f6ef3a730f452535eb87310 Mon Sep 17 00:00:00 2001 From: Anna Skrodzka <56291558+anna-skrodzka@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:41:27 +0100 Subject: [PATCH] targetsTreeBazelPath fixed (#50) Co-authored-by: anna-skrodzka --- deps/src/Vars.scala | 6 ++++-- scala/3rdparty/workspace.bzl | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/deps/src/Vars.scala b/deps/src/Vars.scala index 5070652c..9f28ada5 100644 --- a/deps/src/Vars.scala +++ b/deps/src/Vars.scala @@ -7,7 +7,7 @@ case class Vars( projectRoot: File = new File("."), scalaVersion: String = "", dependencies: String = "", - destination: String = "3rdparty", + destination: String = "/3rdparty", bazelExtName: String = "workspace.bzl", targetsDirName: String = "jvm", targetsFileName: String = "BUILD" @@ -16,7 +16,9 @@ case class Vars( def bazelExtFile: File = new File(depsFile, bazelExtName) def depsBuildFile: File = new File(depsFile, targetsFileName) def targetsTreeFile: File = new File(depsFile, targetsDirName) - def targetsTreeBazelPath: String = s"//$destination/$targetsDirName" + def targetsTreeBazelPath: String = destination match + case d if d.startsWith("/") => s"/$d/$targetsDirName" + case d => s"//$d/$targetsDirName" object Vars: private val builder = OParser.builder[Vars] diff --git a/scala/3rdparty/workspace.bzl b/scala/3rdparty/workspace.bzl index 6537927c..7df8369f 100644 --- a/scala/3rdparty/workspace.bzl +++ b/scala/3rdparty/workspace.bzl @@ -37,7 +37,6 @@ def jar_artifact_callback(hash): ) native.bind(name = hash["bind"], actual = hash["actual"]) - def list_dependencies(): return [ {"artifact":"com.eed3si9n:shaded-jawn-parser_3:1.3.2","url":"https://repo1.maven.org/maven2/com/eed3si9n/shaded-jawn-parser_3/1.3.2/shaded-jawn-parser_3-1.3.2.jar","name":"com_eed3si9n_shaded_jawn_parser_3","actual":"@com_eed3si9n_shaded_jawn_parser_3//jar","bind": "jar/com/eed3si9n/shaded_jawn_parser_3"},