Skip to content

Dependencies cleanup #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 14, 2017
Merged

Conversation

gkk-stripe
Copy link
Contributor

  • migrate from hardcoded _2.11 to scala_mvn_artifact
  • upgrade to scalding-date 0.17.0

See commits for details.

Move scala_version and scala_mvn_artifact from scala.bzl to
scala_cross_version.bzl. This will allow for specs2.bzl to depend on these
functions without introducing a cycle. Before this refactor, the cycle is:
scala.bzl -> specs2.bzl -> specs2.bzl
Migrate most of occurences of Scala dependencies with _2.11 suffix
hardcoded to use scala_mvn_artifact that abstract Scala's major version.

With this change we get down to just a few remaining hardcoded _2.11
uses:

$ ag _2.11
scala/scala.bzl
980:    jars = ["lib/scala-xml_2.11-1.0.5.jar"],
986:    jars = ["lib/scala-parser-combinators_2.11-1.0.4.jar"],
1021:    url = "http://mirror.bazel.build/oss.sonatype.org/content/groups/public/org/scalatest/scalatest_2.11/2.2.6/scalatest_2.11-2.2.6.jar",

specs2/specs2_junit.bzl
10:      name = "io_bazel_rules_scala_org_specs2_specs2_junit_2_11",
14:  native.bind(name = 'io_bazel_rules_scala/dependency/specs2/specs2_junit', actual = '@io_bazel_rules_scala_org_specs2_specs2_junit_2_11//jar')

test/aspect/aspect.bzl
55:            "@io_bazel_rules_scala_org_specs2_specs2_junit_2_11//jar:jar",
@bazel-io
Copy link

Can one of the admins verify this patch?

@@ -1,4 +1,5 @@
load("//scala:scala.bzl",
"scala_mvn_artifact",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this build? I thought you moved this to a new file?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was puzzled by this too. It looks like if you load a symbol in bzl files, it's available to both you and downstream bzl files. Not sure if it's intended that way.

This is a version that has both 2.11 and 2.12 releases available so
will make the diff between 2.11 and 2.12 smaller.
@johnynek johnynek merged commit 7b9b89b into bazel-contrib:master Oct 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants