File tree 3 files changed +20
-17
lines changed 3 files changed +20
-17
lines changed Original file line number Diff line number Diff line change @@ -88,17 +88,19 @@ Rules scala supports all minor versions of Scala 2.11/2.12. By default `Scala 2.
88
88
version you need to
89
89
specify it when calling ` scala_repositories ` . ` scala_repositories ` takes a tuple ` (scala_version, scala_version_jar_shas) `
90
90
as a parameter where ` scala_version ` is the scala version and ` scala_version_jar_shas ` is a ` dict ` with
91
- ` sha256 ` hashes for the maven artifacts ` scala_library ` , ` scala_reflect ` and ` scala_compiler ` :
91
+ ` sha256 ` hashes for the maven artifacts ` scala_compiler ` , ` scala_library ` , and ` scala_reflect ` :
92
+
92
93
``` python
93
94
scala_repositories((
94
- " 2.12.8 " ,
95
+ " 2.12.10 " ,
95
96
{
96
- " scala_compiler" : " f34e9119f45abd41e85b9e121ba19dd9288b3b4af7f7047e86dc70236708d170 " ,
97
- " scala_library" : " 321fb55685635c931eba4bc0d7668349da3f2c09aee2de93a70566066ff25c28 " ,
98
- " scala_reflect" : " 4d6405395c4599ce04cea08ba082339e3e42135de9aae2923c9f5367e957315a "
97
+ " scala_compiler" : " cedc3b9c39d215a9a3ffc0cc75a1d784b51e9edc7f13051a1b4ad5ae22cfbc0c " ,
98
+ " scala_library" : " 0a57044d10895f8d3dd66ad4286891f607169d948845ac51e17b4c1cf0ab569d " ,
99
+ " scala_reflect" : " 56b609e1bab9144fb51525bfa01ccd72028154fc40a58685a1e9adcbe7835730 "
99
100
}
100
101
))
101
102
```
103
+
102
104
If you're using any of the rules ` twitter_scrooge ` , ` tut_repositories ` , ` scala_proto_repositories `
103
105
or ` specs2_junit_repositories ` you also need to specify ` scala_version ` for them. See ` ./test_version/WORKSPACE.template `
104
106
for an example workspace using another scala version.
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ which adds a few dependencies needed for ScalaPB:
5
5
6
6
``` python
7
7
load(" @io_bazel_rules_scala//scala_proto:scala_proto.bzl" , " scala_proto_repositories" )
8
- scala_proto_repositories(scala_version = " 2.12.8 " ) # or whatever scala_version you're on
8
+ scala_proto_repositories(scala_version = " 2.12.10 " ) # or whatever scala_version you're on
9
9
```
10
10
11
11
Then you can import ` scala_proto_library ` in any ` BUILD ` file like this:
Original file line number Diff line number Diff line change 4
4
5
5
test_scala_version () {
6
6
SCALA_VERSION=$1
7
-
7
+
8
8
SCALA_VERSION_SHAS=' '
9
9
SCALA_VERSION_SHAS+=' "scala_compiler": "' $2 ' ",'
10
10
SCALA_VERSION_SHAS+=' "scala_library": "' $3 ' ",'
11
11
SCALA_VERSION_SHAS+=' "scala_reflect": "' $4 ' "'
12
12
13
13
cd " ${dir} " /test_version
14
-
14
+
15
15
timestamp=$( date +%s)
16
-
16
+
17
17
NEW_TEST_DIR=" test_${SCALA_VERSION} _${timestamp} "
18
-
18
+
19
19
cp -r version_specific_tests_dir/ $NEW_TEST_DIR
20
-
20
+
21
21
sed \
22
22
-e " s/\$ {scala_version}/$SCALA_VERSION /" \
23
23
-e " s/\$ {scala_version_shas}/$SCALA_VERSION_SHAS /" \
24
24
WORKSPACE.template >> $NEW_TEST_DIR /WORKSPACE
25
-
25
+
26
26
cd $NEW_TEST_DIR
27
27
28
28
bazel test //...
29
29
RESPONSE_CODE=$?
30
-
30
+
31
31
cd ..
32
32
rm -rf $NEW_TEST_DIR
33
33
@@ -44,7 +44,8 @@ $runner test_scala_version "2.11.12" \
44
44
" 3e892546b72ab547cb77de4d840bcfd05c853e73390fed7370a8f19acb0735a0" \
45
45
" 0b3d6fd42958ee98715ba2ec5fe221f4ca1e694d7c981b0ae0cd68e97baf6dce" \
46
46
" 6ba385b450a6311a15c918cf8688b9af9327c6104f0ecbd35933cfcd3095fe04"
47
- $runner test_scala_version " 2.12.6" \
48
- " 3023b07cc02f2b0217b2c04f8e636b396130b3a8544a8dfad498a19c3e57a863" \
49
- " f81d7144f0ce1b8123335b72ba39003c4be2870767aca15dd0888ba3dab65e98" \
50
- " ffa70d522fc9f9deec14358aa674e6dd75c9dfa39d4668ef15bb52f002ce99fa"
47
+
48
+ $runner test_scala_version " 2.12.10" \
49
+ " cedc3b9c39d215a9a3ffc0cc75a1d784b51e9edc7f13051a1b4ad5ae22cfbc0c" \
50
+ " 0a57044d10895f8d3dd66ad4286891f607169d948845ac51e17b4c1cf0ab569d" \
51
+ " 56b609e1bab9144fb51525bfa01ccd72028154fc40a58685a1e9adcbe7835730"
You can’t perform that action at this time.
0 commit comments