Skip to content

Commit

Permalink
Bump scala 2.12 to v2.12.10 (#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenrui333 authored and ittaiz committed Nov 28, 2019
1 parent ecb5639 commit e568402
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,19 @@ Rules scala supports all minor versions of Scala 2.11/2.12. By default `Scala 2.
version you need to
specify it when calling `scala_repositories`. `scala_repositories` takes a tuple `(scala_version, scala_version_jar_shas)`
as a parameter where `scala_version` is the scala version and `scala_version_jar_shas` is a `dict` with
`sha256` hashes for the maven artifacts `scala_library`, `scala_reflect` and `scala_compiler`:
`sha256` hashes for the maven artifacts `scala_compiler`, `scala_library`, and `scala_reflect`:

```python
scala_repositories((
"2.12.8",
"2.12.10",
{
"scala_compiler": "f34e9119f45abd41e85b9e121ba19dd9288b3b4af7f7047e86dc70236708d170",
"scala_library": "321fb55685635c931eba4bc0d7668349da3f2c09aee2de93a70566066ff25c28",
"scala_reflect": "4d6405395c4599ce04cea08ba082339e3e42135de9aae2923c9f5367e957315a"
"scala_compiler": "cedc3b9c39d215a9a3ffc0cc75a1d784b51e9edc7f13051a1b4ad5ae22cfbc0c",
"scala_library": "0a57044d10895f8d3dd66ad4286891f607169d948845ac51e17b4c1cf0ab569d",
"scala_reflect": "56b609e1bab9144fb51525bfa01ccd72028154fc40a58685a1e9adcbe7835730"
}
))
```

If you're using any of the rules `twitter_scrooge`, `tut_repositories`, `scala_proto_repositories`
or `specs2_junit_repositories` you also need to specify `scala_version` for them. See `./test_version/WORKSPACE.template`
for an example workspace using another scala version.
Expand Down
2 changes: 1 addition & 1 deletion docs/scala_proto_library.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ which adds a few dependencies needed for ScalaPB:

```python
load("@io_bazel_rules_scala//scala_proto:scala_proto.bzl", "scala_proto_repositories")
scala_proto_repositories(scala_version = "2.12.8") # or whatever scala_version you're on
scala_proto_repositories(scala_version = "2.12.10") # or whatever scala_version you're on
```

Then you can import `scala_proto_library` in any `BUILD` file like this:
Expand Down
23 changes: 12 additions & 11 deletions test_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ set -e

test_scala_version() {
SCALA_VERSION=$1

SCALA_VERSION_SHAS=''
SCALA_VERSION_SHAS+='"scala_compiler": "'$2'",'
SCALA_VERSION_SHAS+='"scala_library": "'$3'",'
SCALA_VERSION_SHAS+='"scala_reflect": "'$4'"'

cd "${dir}"/test_version

timestamp=$(date +%s)

NEW_TEST_DIR="test_${SCALA_VERSION}_${timestamp}"

cp -r version_specific_tests_dir/ $NEW_TEST_DIR

sed \
-e "s/\${scala_version}/$SCALA_VERSION/" \
-e "s/\${scala_version_shas}/$SCALA_VERSION_SHAS/" \
WORKSPACE.template >> $NEW_TEST_DIR/WORKSPACE

cd $NEW_TEST_DIR

bazel test //...
RESPONSE_CODE=$?

cd ..
rm -rf $NEW_TEST_DIR

Expand All @@ -44,7 +44,8 @@ $runner test_scala_version "2.11.12" \
"3e892546b72ab547cb77de4d840bcfd05c853e73390fed7370a8f19acb0735a0" \
"0b3d6fd42958ee98715ba2ec5fe221f4ca1e694d7c981b0ae0cd68e97baf6dce" \
"6ba385b450a6311a15c918cf8688b9af9327c6104f0ecbd35933cfcd3095fe04"
$runner test_scala_version "2.12.6" \
"3023b07cc02f2b0217b2c04f8e636b396130b3a8544a8dfad498a19c3e57a863" \
"f81d7144f0ce1b8123335b72ba39003c4be2870767aca15dd0888ba3dab65e98" \
"ffa70d522fc9f9deec14358aa674e6dd75c9dfa39d4668ef15bb52f002ce99fa"

$runner test_scala_version "2.12.10" \
"cedc3b9c39d215a9a3ffc0cc75a1d784b51e9edc7f13051a1b4ad5ae22cfbc0c" \
"0a57044d10895f8d3dd66ad4286891f607169d948845ac51e17b4c1cf0ab569d" \
"56b609e1bab9144fb51525bfa01ccd72028154fc40a58685a1e9adcbe7835730"

0 comments on commit e568402

Please sign in to comment.