diff --git a/3rdparty/jvm/com/github/alexarchambault/BUILD b/3rdparty/jvm/com/github/alexarchambault/BUILD new file mode 100644 index 00000000..f9e7e83e --- /dev/null +++ b/3rdparty/jvm/com/github/alexarchambault/BUILD @@ -0,0 +1,18 @@ +load("@io_bazel_rules_scala//scala:scala_import.bzl", "scala_import") +load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library") +scala_import( + name = "argonaut_shapeless_6_2", + jars = [ + "//external:jar/com/github/alexarchambault/argonaut_shapeless_6_2_2_11" + ], + runtime_deps = [ + "//3rdparty/jvm/com/chuusai:shapeless", + "//3rdparty/jvm/io/argonaut:argonaut", + "//3rdparty/jvm/org/scala_lang:scala_library" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + + diff --git a/3rdparty/jvm/io/argonaut/BUILD b/3rdparty/jvm/io/argonaut/BUILD new file mode 100644 index 00000000..73aa3aa8 --- /dev/null +++ b/3rdparty/jvm/io/argonaut/BUILD @@ -0,0 +1,16 @@ +load("@io_bazel_rules_scala//scala:scala_import.bzl", "scala_import") +load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library") +scala_import( + name = "argonaut", + jars = [ + "//external:jar/io/argonaut/argonaut_2_11" + ], + runtime_deps = [ + "//3rdparty/jvm/org/scala_lang:scala_reflect" + ], + visibility = [ + "//3rdparty/jvm:__subpackages__" + ] +) + + diff --git a/3rdparty/jvm/io/get_coursier/BUILD b/3rdparty/jvm/io/get_coursier/BUILD index 12d571e0..f987d496 100644 --- a/3rdparty/jvm/io/get_coursier/BUILD +++ b/3rdparty/jvm/io/get_coursier/BUILD @@ -1,5 +1,23 @@ load("@io_bazel_rules_scala//scala:scala_import.bzl", "scala_import") load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library") +scala_import( + name = "coursier", + jars = [ + "//external:jar/io/get_coursier/coursier_2_11" + ], + runtime_deps = [ + "//3rdparty/jvm/com/github/alexarchambault:argonaut_shapeless_6_2", + "//3rdparty/jvm/org/scala_lang:scala_library", + ":coursier_cache", + ":coursier_core" + ], + visibility = [ + "//visibility:public" + ] +) + + + scala_import( name = "coursier_cache", jars = [ @@ -7,7 +25,7 @@ scala_import( ], runtime_deps = [ "//3rdparty/jvm/org/scala_lang:scala_library", - ":coursier_core" + ":coursier_util" ], visibility = [ "//visibility:public" @@ -23,6 +41,22 @@ scala_import( ], runtime_deps = [ "//3rdparty/jvm/org/scala_lang/modules:scala_xml", + "//3rdparty/jvm/org/scala_lang:scala_library", + ":coursier_util" + ], + visibility = [ + "//visibility:public" + ] +) + + + +scala_import( + name = "coursier_util", + jars = [ + "//external:jar/io/get_coursier/coursier_util_2_11" + ], + runtime_deps = [ "//3rdparty/jvm/org/scala_lang:scala_library" ], visibility = [ diff --git a/3rdparty/target_file.bzl b/3rdparty/target_file.bzl index 9261bd0f..f30551b6 100644 --- a/3rdparty/target_file.bzl +++ b/3rdparty/target_file.bzl @@ -165,14 +165,18 @@ def list_target_data(): "3rdparty/jvm/org/scala_lang:scala_library": ["lang||||||scala/unmangled:2.11.8","name||||||//3rdparty/jvm/org/scala_lang:scala_library","visibility||||||//3rdparty/jvm:__subpackages__","kind||||||library","deps|||L|||","jars|||L|||","sources|||L|||","exports|||L|||@io_bazel_rules_scala_scala_library//:io_bazel_rules_scala_scala_library","runtimeDeps|||L|||","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/org/scala_lang:scala_reflect": ["lang||||||scala/unmangled:2.11.8","name||||||//3rdparty/jvm/org/scala_lang:scala_reflect","visibility||||||//3rdparty/jvm:__subpackages__","kind||||||library","deps|||L|||","jars|||L|||","sources|||L|||","exports|||L|||@io_bazel_rules_scala_scala_reflect//:io_bazel_rules_scala_scala_reflect","runtimeDeps|||L|||","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/com/chuusai:shapeless": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/com/chuusai:shapeless","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/com/chuusai/shapeless_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/org/typelevel:macro_compat","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], +"3rdparty/jvm/com/github/alexarchambault:argonaut_shapeless_6_2": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/com/github/alexarchambault:argonaut_shapeless_6_2","visibility||||||//3rdparty/jvm:__subpackages__","kind||||||import","deps|||L|||","jars|||L|||//external:jar/com/github/alexarchambault/argonaut_shapeless_6_2_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/io/argonaut:argonaut|||//3rdparty/jvm/com/chuusai:shapeless","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/com/monovore:decline": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/com/monovore:decline","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/com/monovore/decline_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/org/typelevel:cats_core","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], +"3rdparty/jvm/io/argonaut:argonaut": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/argonaut:argonaut","visibility||||||//3rdparty/jvm:__subpackages__","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/argonaut/argonaut_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_reflect","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/io/circe:circe_core": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/circe:circe_core","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/circe/circe_core_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/io/circe:circe_numbers|||//3rdparty/jvm/org/typelevel:cats_core","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/io/circe:circe_generic": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/circe:circe_generic","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/circe/circe_generic_2_11","sources|||L|||","exports|||L|||//3rdparty/jvm/com/chuusai:shapeless|||//3rdparty/jvm/org/typelevel:cats_core|||//3rdparty/jvm/org/typelevel:cats_kernel|||//3rdparty/jvm/org/typelevel:macro_compat","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/io/circe:circe_core","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/io/circe:circe_jackson25": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/circe:circe_jackson25","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/circe/circe_jackson25_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/io/circe:circe_core|||//3rdparty/jvm/com/fasterxml/jackson/core:jackson_core|||//3rdparty/jvm/com/fasterxml/jackson/core:jackson_databind","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/io/circe:circe_jawn": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/circe:circe_jawn","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/circe/circe_jawn_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/io/circe:circe_core|||//3rdparty/jvm/org/spire_math:jawn_parser","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/io/circe:circe_numbers": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/circe:circe_numbers","visibility||||||//3rdparty/jvm:__subpackages__","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/circe/circe_numbers_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], -"3rdparty/jvm/io/get_coursier:coursier_cache": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/get_coursier:coursier_cache","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/get_coursier/coursier_cache_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/io/get_coursier:coursier_core","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], -"3rdparty/jvm/io/get_coursier:coursier_core": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/get_coursier:coursier_core","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/get_coursier/coursier_core_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/org/scala_lang/modules:scala_xml","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], +"3rdparty/jvm/io/get_coursier:coursier": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/get_coursier:coursier","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/get_coursier/coursier_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/io/get_coursier:coursier_core|||//3rdparty/jvm/io/get_coursier:coursier_cache|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/com/github/alexarchambault:argonaut_shapeless_6_2","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], +"3rdparty/jvm/io/get_coursier:coursier_cache": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/get_coursier:coursier_cache","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/get_coursier/coursier_cache_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/io/get_coursier:coursier_util|||//3rdparty/jvm/org/scala_lang:scala_library","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], +"3rdparty/jvm/io/get_coursier:coursier_core": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/get_coursier:coursier_core","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/get_coursier/coursier_core_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/io/get_coursier:coursier_util|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/org/scala_lang/modules:scala_xml","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], +"3rdparty/jvm/io/get_coursier:coursier_util": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/io/get_coursier:coursier_util","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/io/get_coursier/coursier_util_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/org/scala_lang/modules:scala_parser_combinators": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/org/scala_lang/modules:scala_parser_combinators","visibility||||||//3rdparty/jvm:__subpackages__","kind||||||library","deps|||L|||","jars|||L|||","sources|||L|||","exports|||L|||@io_bazel_rules_scala_scala_parser_combinators//:io_bazel_rules_scala_scala_parser_combinators","runtimeDeps|||L|||","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/org/scala_lang/modules:scala_xml": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/org/scala_lang/modules:scala_xml","visibility||||||//visibility:public","kind||||||library","deps|||L|||","jars|||L|||","sources|||L|||","exports|||L|||@io_bazel_rules_scala_scala_xml//:io_bazel_rules_scala_scala_xml","runtimeDeps|||L|||","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], "3rdparty/jvm/org/scalacheck:scalacheck": ["lang||||||scala:2.11.8","name||||||//3rdparty/jvm/org/scalacheck:scalacheck","visibility||||||//visibility:public","kind||||||import","deps|||L|||","jars|||L|||//external:jar/org/scalacheck/scalacheck_2_11","sources|||L|||","exports|||L|||","runtimeDeps|||L|||//3rdparty/jvm/org/scala_lang:scala_library|||//3rdparty/jvm/org/scala_sbt:test_interface","processorClasses|||L|||","generatesApi|||B|||false","licenses|||L|||","generateNeverlink|||B|||false"], diff --git a/3rdparty/workspace.bzl b/3rdparty/workspace.bzl index 01a60653..03da326c 100644 --- a/3rdparty/workspace.bzl +++ b/3rdparty/workspace.bzl @@ -80,9 +80,11 @@ def list_dependencies(): # - io.circe:circe-jackson25_2.11:0.9.0 wanted version 2.5.5 {"artifact": "com.fasterxml.jackson.core:jackson-databind:2.5.5", "lang": "java", "sha1": "b08c3194166a230e60f56ac98bcd5cab5ee39d65", "sha256": "7733bd2a60158e448a21e4ee4578739e57a128d816410e75e3099b1494b8e58c", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.5.5/jackson-databind-2.5.5.jar", "source": {"sha1": "18480db6c085b9227ef693fb3e96ce7853c9984b", "sha256": "5ec33d76107f03f1ccdee713bd688951c614ce8dfa59662fd112684732cd9757", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.5.5/jackson-databind-2.5.5-sources.jar"} , "name": "com_fasterxml_jackson_core_jackson_databind", "actual": "@com_fasterxml_jackson_core_jackson_databind//jar", "bind": "jar/com/fasterxml/jackson/core/jackson_databind"}, {"artifact": "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.5.3", "lang": "java", "sha1": "8fc7e5a9911c3ab4b0dd7e74f12621681835e3fc", "sha256": "fb37d4f86680af414742ccd56a897aedea678403b5eadb2f0990b687486e4be0", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.5.3/jackson-dataformat-yaml-2.5.3.jar", "source": {"sha1": "173db98f9d13cb2395d0e038dad47d79b21c6fe4", "sha256": "aa6be194db8a6740620039e8ea2f5078d97b8b5db2a42fcbd4736bc242b7ed8b", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.5.3/jackson-dataformat-yaml-2.5.3-sources.jar"} , "name": "com_fasterxml_jackson_dataformat_jackson_dataformat_yaml", "actual": "@com_fasterxml_jackson_dataformat_jackson_dataformat_yaml//jar", "bind": "jar/com/fasterxml/jackson/dataformat/jackson_dataformat_yaml"}, + {"artifact": "com.github.alexarchambault:argonaut-shapeless_6.2_2.11:1.2.0-M11", "lang": "scala", "sha1": "1a4b6680f12516384dd19498d3064e04afd5a276", "sha256": "bd527b2e9248c2d857dc43444f6a00fdefddcac42df8d430a247fd6a7d643cd3", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/github/alexarchambault/argonaut-shapeless_6.2_2.11/1.2.0-M11/argonaut-shapeless_6.2_2.11-1.2.0-M11.jar", "source": {"sha1": "d6ad3ba9c73ac15ea9f4992e207bbc136547cb19", "sha256": "cb426bdc2df8afa7d0401a7e871ad12663573ad027be26798ed1cc10f6b908fd", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/github/alexarchambault/argonaut-shapeless_6.2_2.11/1.2.0-M11/argonaut-shapeless_6.2_2.11-1.2.0-M11-sources.jar"} , "name": "com_github_alexarchambault_argonaut_shapeless_6_2_2_11", "actual": "@com_github_alexarchambault_argonaut_shapeless_6_2_2_11//jar:file", "bind": "jar/com/github/alexarchambault/argonaut_shapeless_6_2_2_11"}, {"artifact": "com.google.guava:guava:18.0", "lang": "java", "sha1": "cce0823396aa693798f8882e64213b1772032b09", "sha256": "d664fbfc03d2e5ce9cab2a44fb01f1d0bf9dfebeccc1a473b1f9ea31f79f6f99", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/google/guava/guava/18.0/guava-18.0.jar", "source": {"sha1": "ad97fe8faaf01a3d3faacecd58e8fa6e78a973ca", "sha256": "0f3381ce4caa3a01602cdf0d0f4437b9ad8f347ddabbd873ded4d498e19d9590", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/google/guava/guava/18.0/guava-18.0-sources.jar"} , "name": "com_google_guava_guava", "actual": "@com_google_guava_guava//jar", "bind": "jar/com/google/guava/guava"}, {"artifact": "com.monovore:decline_2.11:0.4.2", "lang": "scala", "sha1": "6ba2ad6bb271bfe1df1a1ada1725a262d0cad437", "sha256": "c3c732cf50b616d7c23b1410ab605c33a630a4daf36ce9882b665b4e6d6ea361", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/monovore/decline_2.11/0.4.2/decline_2.11-0.4.2.jar", "source": {"sha1": "6859ade0f9d3a293086765bca0440ce01ade0280", "sha256": "bbab8cc31cd043c0cd77d96cfa8894c7609cdadf4913901c9dd7746ccd37edc6", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/monovore/decline_2.11/0.4.2/decline_2.11-0.4.2-sources.jar"} , "name": "com_monovore_decline_2_11", "actual": "@com_monovore_decline_2_11//jar:file", "bind": "jar/com/monovore/decline_2_11"}, {"artifact": "commons-codec:commons-codec:1.6", "lang": "java", "sha1": "b7f0fc8f61ecadeb3695f0b9464755eee44374d4", "sha256": "54b34e941b8e1414bd3e40d736efd3481772dc26db3296f6aa45cec9f6203d86", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar", "source": {"sha1": "61e9f9d11fe3e12ec62f633006e99d75fd7f19c8", "sha256": "cff6a3db12b91f0fa3484d928d7863f162b0ae2789eaa3fb21604f2487611558", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.6/commons-codec-1.6-sources.jar"} , "name": "commons_codec_commons_codec", "actual": "@commons_codec_commons_codec//jar", "bind": "jar/commons_codec/commons_codec"}, + {"artifact": "io.argonaut:argonaut_2.11:6.2.3", "lang": "scala", "sha1": "eef0bd6225b0a901a1937bb529d4b31bdb375a9e", "sha256": "94d0e1f4963e96f99cf81d2e458df3e39dadebdf3140a8a6fc87df8a47bf86c8", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/argonaut/argonaut_2.11/6.2.3/argonaut_2.11-6.2.3.jar", "source": {"sha1": "9d5a3b78645b6e04b129ee79129e5a04b00c2568", "sha256": "fef7bf268306b8680eca586b9a00a1ab8ef1bb238a42d0c6e32975495016a390", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/argonaut/argonaut_2.11/6.2.3/argonaut_2.11-6.2.3-sources.jar"} , "name": "io_argonaut_argonaut_2_11", "actual": "@io_argonaut_argonaut_2_11//jar:file", "bind": "jar/io/argonaut/argonaut_2_11"}, # duplicates in io.circe:circe-core_2.11 fixed to 0.9.3 # - io.circe:circe-generic_2.11:0.9.3 wanted version 0.9.3 # - io.circe:circe-jackson25_2.11:0.9.0 wanted version 0.9.0 @@ -92,8 +94,10 @@ def list_dependencies(): {"artifact": "io.circe:circe-jackson25_2.11:0.9.0", "lang": "scala", "sha1": "fa89394e3631898bb682c807f20a489c69d0581e", "sha256": "287f611627ac60dcabb5c7bc545ac0bb988fd44732aeb2b8e5799ba58cbda654", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/circe/circe-jackson25_2.11/0.9.0/circe-jackson25_2.11-0.9.0.jar", "source": {"sha1": "134c3633a77095b896bd5069ccdb9b04a523ec5f", "sha256": "0cdbf49f64a1f33bcfa608aee05164c9ea04fc71379ce8d42f3dd9c42f2b936b", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/circe/circe-jackson25_2.11/0.9.0/circe-jackson25_2.11-0.9.0-sources.jar"} , "name": "io_circe_circe_jackson25_2_11", "actual": "@io_circe_circe_jackson25_2_11//jar:file", "bind": "jar/io/circe/circe_jackson25_2_11"}, {"artifact": "io.circe:circe-jawn_2.11:0.9.3", "lang": "scala", "sha1": "5d4329cb6ff6f9bf84d94e005331f46a05a90163", "sha256": "294e6c8add6ee214598855c58e9ad2c3c8c6f3247c0c4822b4b314b36e63a289", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/circe/circe-jawn_2.11/0.9.3/circe-jawn_2.11-0.9.3.jar", "source": {"sha1": "a3bd202a6a45f31224eb5af3e1679a05a8b4b6eb", "sha256": "568b03a50bb9fc4b9cb078b1d13c3985a334262dbb29ed975e465ad57acf6a03", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/circe/circe-jawn_2.11/0.9.3/circe-jawn_2.11-0.9.3-sources.jar"} , "name": "io_circe_circe_jawn_2_11", "actual": "@io_circe_circe_jawn_2_11//jar:file", "bind": "jar/io/circe/circe_jawn_2_11"}, {"artifact": "io.circe:circe-numbers_2.11:0.9.3", "lang": "scala", "sha1": "bca36973eb5b69d109e8c3830442248f3ee26dc3", "sha256": "bdee05802a00862887c6ecc36edf15991e24aec43e412fa5afd1ee6ddf64c0cd", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/circe/circe-numbers_2.11/0.9.3/circe-numbers_2.11-0.9.3.jar", "source": {"sha1": "783acbf31bc2473093a7462f3551a4a2c4273275", "sha256": "6e9969e3e5e7c5c1d3ab360ef3a9951a29b5d787f81d43477c2f586c28df6e9d", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/circe/circe-numbers_2.11/0.9.3/circe-numbers_2.11-0.9.3-sources.jar"} , "name": "io_circe_circe_numbers_2_11", "actual": "@io_circe_circe_numbers_2_11//jar:file", "bind": "jar/io/circe/circe_numbers_2_11"}, - {"artifact": "io.get-coursier:coursier-cache_2.11:1.1.0-M10", "lang": "scala", "sha1": "e87779f9092e8c365ee469fe1c0b317d1535d3c0", "sha256": "d58359d49f97b80f10c437f87c9de267632a090a34e0529838025bb1a3784764", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier-cache_2.11/1.1.0-M10/coursier-cache_2.11-1.1.0-M10.jar", "source": {"sha1": "ba28e94e7e85ffea9342303aa37d5f1956471703", "sha256": "a05a8589edb18764c93bc924e738aba6315c530f2e239290f1664d352d6e3735", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier-cache_2.11/1.1.0-M10/coursier-cache_2.11-1.1.0-M10-sources.jar"} , "name": "io_get_coursier_coursier_cache_2_11", "actual": "@io_get_coursier_coursier_cache_2_11//jar:file", "bind": "jar/io/get_coursier/coursier_cache_2_11"}, - {"artifact": "io.get-coursier:coursier-core_2.11:1.1.0-M10", "lang": "scala", "sha1": "87adde5db9407289f7ffd337f00d6a9bf2030843", "sha256": "9628a008fad80c46499bdd680095f4c9a8dc5a781a184f20305ec0d3d6b7ba43", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier-core_2.11/1.1.0-M10/coursier-core_2.11-1.1.0-M10.jar", "source": {"sha1": "f07262adb12dace6b7eced5d8d8c06ffcb9ab6a0", "sha256": "e94ede761be9af8320a846ff618eeef45ba420e4628388d9e0a713884b93d0d7", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier-core_2.11/1.1.0-M10/coursier-core_2.11-1.1.0-M10-sources.jar"} , "name": "io_get_coursier_coursier_core_2_11", "actual": "@io_get_coursier_coursier_core_2_11//jar:file", "bind": "jar/io/get_coursier/coursier_core_2_11"}, + {"artifact": "io.get-coursier:coursier-cache_2.11:2.0.0-RC4", "lang": "scala", "sha1": "03ebe9a8d643a62f9c601b04d3de8103fde768b6", "sha256": "3b185b2a2385eb04ebdadbd9ad19b4a4e0b84b591da5666e1fc113d7c9e5ed24", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier-cache_2.11/2.0.0-RC4/coursier-cache_2.11-2.0.0-RC4.jar", "source": {"sha1": "9905d1a432c796e21968d76317afc6d011703cb7", "sha256": "29445305902d8a4e6362dfe5faddaa9ac17b3aa2958efa314f4bffe0a0c8129d", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier-cache_2.11/2.0.0-RC4/coursier-cache_2.11-2.0.0-RC4-sources.jar"} , "name": "io_get_coursier_coursier_cache_2_11", "actual": "@io_get_coursier_coursier_cache_2_11//jar:file", "bind": "jar/io/get_coursier/coursier_cache_2_11"}, + {"artifact": "io.get-coursier:coursier-core_2.11:2.0.0-RC4", "lang": "scala", "sha1": "e62c60ed842edc58cb3e441a7a8c648b60a187a0", "sha256": "abc17b8959f9b3d1429162ed12abbbfee57c445831cbf4df2001c85126772891", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier-core_2.11/2.0.0-RC4/coursier-core_2.11-2.0.0-RC4.jar", "source": {"sha1": "759dc2ccc2059608cc47b9301e4c629ab980b68c", "sha256": "df90c640374c411725852236d4a19df75e5b14acdf6e6a4e90e8bb35e4850701", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier-core_2.11/2.0.0-RC4/coursier-core_2.11-2.0.0-RC4-sources.jar"} , "name": "io_get_coursier_coursier_core_2_11", "actual": "@io_get_coursier_coursier_core_2_11//jar:file", "bind": "jar/io/get_coursier/coursier_core_2_11"}, + {"artifact": "io.get-coursier:coursier-util_2.11:2.0.0-RC4", "lang": "scala", "sha1": "ed403c75c87ac78ee729d0617d6b45648d168634", "sha256": "9c07ef2ca26783dbc0d8d7fd47a797bda94bd5bd14a0e454edfeeee80cfe0a04", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier-util_2.11/2.0.0-RC4/coursier-util_2.11-2.0.0-RC4.jar", "source": {"sha1": "9c4c18dee56cc1fa1e8fa26c5e33b9cd56cfe536", "sha256": "87944a6252fd374d569ee8b6c47e174ac54e777258579466010e84e2d2d92120", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier-util_2.11/2.0.0-RC4/coursier-util_2.11-2.0.0-RC4-sources.jar"} , "name": "io_get_coursier_coursier_util_2_11", "actual": "@io_get_coursier_coursier_util_2_11//jar:file", "bind": "jar/io/get_coursier/coursier_util_2_11"}, + {"artifact": "io.get-coursier:coursier_2.11:2.0.0-RC4", "lang": "scala", "sha1": "744022a1796c63866fd9e71bea002ec9b6104c1e", "sha256": "9c24564adedd9805ca9ec689f195710089b01145084280af6ad7e5c7243b6e55", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier_2.11/2.0.0-RC4/coursier_2.11-2.0.0-RC4.jar", "source": {"sha1": "df067f3dc602b7740ab449810a2d05c4c900fa51", "sha256": "b90868e29affd0ef689b468fbb568b4be617eb35873458331136635e785f665a", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/get-coursier/coursier_2.11/2.0.0-RC4/coursier_2.11-2.0.0-RC4-sources.jar"} , "name": "io_get_coursier_coursier_2_11", "actual": "@io_get_coursier_coursier_2_11//jar:file", "bind": "jar/io/get_coursier/coursier_2_11"}, {"artifact": "javax.annotation:jsr250-api:1.0", "lang": "java", "sha1": "5025422767732a1ab45d93abfea846513d742dcf", "sha256": "a1a922d0d9b6d183ed3800dfac01d1e1eb159f0e8c6f94736931c1def54a941f", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar", "source": {"sha1": "9b1fba77edd118e13c42bda43d3c993dadd52c25", "sha256": "025c47d76c60199381be07012a0c5f9e74661aac5bd67f5aec847741c5b7f838", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/javax/annotation/jsr250-api/1.0/jsr250-api-1.0-sources.jar"} , "name": "javax_annotation_jsr250_api", "actual": "@javax_annotation_jsr250_api//jar", "bind": "jar/javax/annotation/jsr250_api"}, {"artifact": "javax.enterprise:cdi-api:1.0", "lang": "java", "sha1": "44c453f60909dfc223552ace63e05c694215156b", "sha256": "1f10b2204cc77c919301f20ff90461c3df1b6e6cb148be1c2d22107f4851d423", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar", "source": {"sha1": "3a3b9c3e5a1ec04c0c8b82e249cee7aeb4a96f9a", "sha256": "0e7c351dfe05759f84dc3eddaac1da4ef72578b494b53338829d34b12271374f", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/javax/enterprise/cdi-api/1.0/cdi-api-1.0-sources.jar"} , "name": "javax_enterprise_cdi_api", "actual": "@javax_enterprise_cdi_api//jar", "bind": "jar/javax/enterprise/cdi_api"}, {"artifact": "javax.inject:javax.inject:1", "lang": "java", "sha1": "6975da39a7040257bd51d21a231b76c915872d38", "sha256": "91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/javax/inject/javax.inject/1/javax.inject-1.jar", "source": {"sha1": "a00123f261762a7c5e0ec916a2c7c8298d29c400", "sha256": "c4b87ee2911c139c3daf498a781967f1eb2e75bc1a8529a2e7b328a15d0e433e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/javax/inject/javax.inject/1/javax.inject-1-sources.jar"} , "name": "javax_inject_javax_inject", "actual": "@javax_inject_javax_inject//jar", "bind": "jar/javax/inject/javax_inject"}, diff --git a/dependencies.yaml b/dependencies.yaml index 9f581aaf..30b0fed5 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -51,8 +51,8 @@ dependencies: io.get-coursier: coursier: lang: scala - modules: [ "cache", "core" ] - version: "1.1.0-M10" + modules: [ "cache", "core", "util", ""] + version: "2.0.0-RC4" org.apache.maven: maven: diff --git a/src/scala/com/github/johnynek/bazel_deps/BUILD b/src/scala/com/github/johnynek/bazel_deps/BUILD index cf32e7b6..7b82c9ad 100644 --- a/src/scala/com/github/johnynek/bazel_deps/BUILD +++ b/src/scala/com/github/johnynek/bazel_deps/BUILD @@ -53,6 +53,8 @@ scala_library( deps = [ "//3rdparty/jvm/io/get_coursier:coursier_core", "//3rdparty/jvm/io/get_coursier:coursier_cache", + "//3rdparty/jvm/io/get_coursier:coursier", + "//3rdparty/jvm/io/get_coursier:coursier_util", "//3rdparty/jvm/org/slf4j:slf4j_api", "//3rdparty/jvm/org/typelevel:cats_core", ":resolver", diff --git a/src/scala/com/github/johnynek/bazel_deps/CoursierResolver.scala b/src/scala/com/github/johnynek/bazel_deps/CoursierResolver.scala index 9773a4be..e0d85b43 100644 --- a/src/scala/com/github/johnynek/bazel_deps/CoursierResolver.scala +++ b/src/scala/com/github/johnynek/bazel_deps/CoursierResolver.scala @@ -1,11 +1,12 @@ package com.github.johnynek.bazel_deps -import coursier.{Artifact, Cache, CachePolicy, Dependency, Fetch, Project, Resolution} -import coursier.util.{Schedulable, Task} +import coursier.{Dependency, ResolutionProcess, Project, Resolution} +import coursier.cache.{FileCache, CachePolicy} +import coursier.util.{Artifact, Task} import cats.MonadError import cats.data.{Nested, NonEmptyList, Validated, ValidatedNel} import cats.implicits._ -import coursier.cache.LocalRepositories +import coursier.LocalRepositories import coursier.core._ import org.slf4j.LoggerFactory @@ -17,7 +18,21 @@ import scala.concurrent.duration.Duration object CoursierResolver { // 12 concurrent downloads // most downloads are tiny sha downloads so try keep things alive - lazy val downloadPool = Schedulable.fixedThreadPool(12) + lazy val downloadPool = { + import java.util.concurrent.{ExecutorService, Executors, ThreadFactory} +Executors.newFixedThreadPool( + 12, + // from scalaz.concurrent.Strategy.DefaultDaemonThreadFactory + new ThreadFactory { + val defaultThreadFactory = Executors.defaultThreadFactory() + def newThread(r: Runnable) = { + val t = defaultThreadFactory.newThread(r) + t.setDaemon(true) + t + } + } + ) +} } class CoursierResolver(servers: List[MavenServer], ec: ExecutionContext, runTimeout: Duration) extends Resolver[Task] { // TODO: add support for a local file cache other than ivy @@ -32,14 +47,16 @@ class CoursierResolver(servers: List[MavenServer], ec: ExecutionContext, runTime } } - private[this] val fetch = Fetch.from(repos, Cache.fetch[Task](cachePolicy = CachePolicy.FetchMissing, pool = CoursierResolver.downloadPool)) + private[this] val fetch = ResolutionProcess.fetch(repos, FileCache(). + withCachePolicies(Seq(CachePolicy.FetchMissing)) + .withPool(CoursierResolver.downloadPool).fetch) private[this] val logger = LoggerFactory.getLogger("bazel_deps.CoursierResolver") // Instructs the coursier resolver to keep `runtime`-scoped dependencies. private[this] val DefaultConfiguration = "default(compile)" - def serverFor(a: coursier.Artifact): Option[MavenServer] = + def serverFor(a: Artifact): Option[MavenServer] = if (a.url.isEmpty) None else servers.find { ms => a.url.startsWith(ms.url) } @@ -65,7 +82,7 @@ class CoursierResolver(servers: List[MavenServer], ec: ExecutionContext, runTime def run[A](fa: Task[A]): Try[A] = Try(Await.result(fa.value(ec), runTimeout)) - case class FileErrorException(error: coursier.FileError) extends Exception(error.describe) + case class FileErrorException(error: coursier.cache.ArtifactError) extends Exception(error.describe) case class DownloadFailures(messages: NonEmptyList[String]) extends Exception("resolution errors:\n" + messages.toList.mkString("\n")) def getShas(m: List[MavenCoordinate]): Task[SortedMap[MavenCoordinate, ResolvedShasValue]] = { @@ -75,16 +92,18 @@ class CoursierResolver(servers: List[MavenServer], ec: ExecutionContext, runTime def lookup(c: MavenCoordinate): N[ResolvedShasValue] = { - def downloadShas(digestType: DigestType, as: List[coursier.Artifact]): Task[Option[ShaValue]] = + def downloadShas(digestType: DigestType, as: List[Artifact]): Task[Option[ShaValue]] = as.foldM(Option.empty[ShaValue]) { case (s @ Some(r), _) => Task.point(s) case (None, a) => downloadSha(digestType, a) } - def downloadSha(digestType: DigestType, a: coursier.Artifact): Task[Option[ShaValue]] = { + def downloadSha(digestType: DigestType, a: Artifact): Task[Option[ShaValue]] = { // Because Cache.file is hijacked to download SHAs directly (rather than signed artifacts) checksum verification // is turned off. Checksums don't themselves have checksum files. - Cache.file[Task](a, checksums = Seq(None), cachePolicy = CachePolicy.FetchMissing, pool = CoursierResolver.downloadPool).run.map { + FileCache().withChecksums(Seq(None)) + .withCachePolicies(Seq(CachePolicy.FetchMissing)) + .withPool(CoursierResolver.downloadPool).file(a).run.map { case Left(error) => logger.info(s"failure to download ${a.url}, ${error.describe}") None @@ -97,8 +116,8 @@ class CoursierResolver(servers: List[MavenServer], ec: ExecutionContext, runTime } } - def computeSha(digestType: DigestType, artifact: coursier.Artifact): Task[ShaValue] = - Cache.file[Task](artifact, cachePolicy = CachePolicy.FetchMissing, pool = CoursierResolver.downloadPool).run.flatMap { e => + def computeSha(digestType: DigestType, artifact: Artifact): Task[ShaValue] = + FileCache().withCachePolicies(Seq(CachePolicy.FetchMissing)).withPool(CoursierResolver.downloadPool).file(artifact).run.flatMap { e => resolverMonad.fromTry(e match { case Left(error) => Failure(FileErrorException(error)) @@ -107,7 +126,7 @@ class CoursierResolver(servers: List[MavenServer], ec: ExecutionContext, runTime }) } - def computeShas(digestType: DigestType, as: NonEmptyList[coursier.Artifact]): Task[ShaValue] = { + def computeShas(digestType: DigestType, as: NonEmptyList[Artifact]): Task[ShaValue] = { val errorFn: Throwable => Task[ShaValue] = as.tail match { case Nil => {e: Throwable => resolverMonad.raiseError(new RuntimeException(s"we could not download the artifact ${c.asString} to compute the hash for digest type ${digestType} with error ${e}")) @@ -131,7 +150,7 @@ class CoursierResolver(servers: List[MavenServer], ec: ExecutionContext, runTime } } - def processArtifact(src: Artifact.Source, dep: Dependency, proj: Project): Task[Option[JarDescriptor]] = { + def processArtifact(src: coursier.core.ArtifactSource, dep: Dependency, proj: Project): Task[Option[JarDescriptor]] = { val maybeArtifacts = src.artifacts(dep, proj, None) .map { case (_, artifact: Artifact) => artifact } .toList @@ -160,8 +179,8 @@ class CoursierResolver(servers: List[MavenServer], ec: ExecutionContext, runTime val module = coursier.Module(Organization(c.group.asString), ModuleName(c.artifact.artifactId), Map.empty) val version = c.version.asString - val f = Cache.fetch[Task](checksums = Seq(Some("SHA-1"), None), cachePolicy = CachePolicy.FetchMissing, pool = CoursierResolver.downloadPool) - val task = Fetch.find[Task](repos, module, version, f).run + val f = FileCache().withChecksums(Seq(Some("SHA-1"), None)).withCachePolicies(Seq(CachePolicy.FetchMissing)).withPool(CoursierResolver.downloadPool).fetch + val task = ResolutionProcess.fetchOne[Task](repos, module, version, f, Seq()).run /* * we use Nested here to accumulate all the errors so we can @@ -184,7 +203,7 @@ class CoursierResolver(servers: List[MavenServer], ec: ExecutionContext, runTime Classifier(c.artifact.classifier.getOrElse("")) )) - val srcDep = dep.copy(attributes = coursier.Attributes( + val srcDep = dep.withAttributes(coursier.Attributes( Type(c.artifact.packaging), Classifier("sources") )) @@ -246,7 +265,7 @@ class CoursierResolver(servers: List[MavenServer], ec: ExecutionContext, runTime artifactFromDep(cd), Version(cd.version)) - val roots: Set[coursier.Dependency] = coords.map(toDep).toSet + val roots: Seq[coursier.core.Dependency] = coords.map(toDep).toSet.toSeq Resolution(roots).process.run(fetch).map { res => val depCache = res.finalDependenciesCache diff --git a/test/scala/com/github/johnynek/bazel_deps/CoursierTest.scala b/test/scala/com/github/johnynek/bazel_deps/CoursierTest.scala index 54ce5ec0..90f9f31a 100644 --- a/test/scala/com/github/johnynek/bazel_deps/CoursierTest.scala +++ b/test/scala/com/github/johnynek/bazel_deps/CoursierTest.scala @@ -226,4 +226,47 @@ dependencies: assert(Writer.targets(normalized, model).isLeft) } + + test("version alignment breaks resolution") { + def configForVersions(firstVersion: String, secondVersion: String) = s""" +options: + buildHeader: [ "load(\\"@io_bazel_rules_scala//scala:scala_import.bzl\\", \\"scala_import\\")" ] + languages: [ "java", "scala:2.11.8" ] + resolverType: "coursier" + resolvers: + - id: "mavencentral" + type: "default" + url: https://repo.maven.apache.org/maven2/ + transitivity: runtime_deps + versionConflictPolicy: highest + +dependencies: + org.kie: + kie-api: + lang: java + version: "${firstVersion}" + + org.kie.server: + kie: + lang: java + modules: [ "server-api", "server-client" ] + version: "${secondVersion}" +""" + + def testConfig(firstVersion: String, secondVersion: String): Unit = { + val model = Decoders.decodeModel(Yaml, configForVersions(firstVersion, secondVersion)).right.get + val (normalized, shas, duplicates) = MakeDeps.runResolve(model, null).get + val written = Writer.targets(normalized, model) + + written match { + case Left(errors) => + assert(false, errors) + case Right(_) => () + } + } + + testConfig("7.26.0.Final", "7.27.0.Final") + testConfig("7.27.0.Final", "7.26.0.Final") + testConfig("7.27.0.Final", "7.27.0.Final") + } }