File tree 11 files changed +148
-0
lines changed
11 files changed +148
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,12 @@ tasks:
85
85
bazel : 6.3.0
86
86
shell_commands :
87
87
- " ./test_examples.sh"
88
+ cross_build_linux :
89
+ name : " ./test_cross_build"
90
+ platform : ubuntu2004
91
+ bazel : 6.3.0
92
+ shell_commands :
93
+ - " ./test_cross_build.sh"
88
94
lint_linux :
89
95
name : " bazel //tools:lint_check"
90
96
platform : ubuntu2004
Original file line number Diff line number Diff line change
1
+ # shellcheck source=./test_runner.sh
2
+ dir=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd )
3
+ . " ${dir} " /test_runner.sh
4
+ . " ${dir} " /test_helper.sh
5
+ runner=$( get_test_runner " ${1:- local} " )
6
+
7
+ cd test_cross_build
8
+
9
+ function test_cross_build() {
10
+ bazel test //...
11
+ bazel clean
12
+ bazel shutdown;
13
+ }
14
+
15
+ $runner test_cross_build
Original file line number Diff line number Diff line change @@ -5,5 +5,6 @@ set -euo pipefail
5
5
dir=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd )
6
6
" ${dir} " /test_rules_scala.sh
7
7
" ${dir} " /test_version.sh
8
+ " ${dir} " /test_cross_build.sh
8
9
" ${dir} " /test_reproducibility.sh
9
10
# "${dir}"/test_intellij_aspect.sh
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ test_dir=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) /test/shell
6
+
7
+ . " ${test_dir} " /test_cross_build.sh
Original file line number Diff line number Diff line change
1
+ # WORKSPACE
2
+
3
+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
4
+
5
+ http_archive (
6
+ name = "bazel_skylib" ,
7
+ sha256 = "d00f1389ee20b60018e92644e0948e16e350a7707219e7a390fb0a99b6ec9262" ,
8
+ urls = [
9
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.7.0/bazel-skylib-1.7.0.tar.gz" ,
10
+ "https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.0/bazel-skylib-1.7.0.tar.gz" ,
11
+ ],
12
+ )
13
+
14
+ local_repository (
15
+ name = "io_bazel_rules_scala" ,
16
+ path = ".." ,
17
+ )
18
+
19
+ load ("@io_bazel_rules_scala//:scala_config.bzl" , "scala_config" )
20
+
21
+ scala_config (
22
+ scala_version = "3.1.0" ,
23
+ scala_versions = [
24
+ "2.11.12" ,
25
+ "2.12.18" ,
26
+ "2.13.12" ,
27
+ "3.1.0" ,
28
+ "3.2.1" ,
29
+ "3.3.1" ,
30
+ ],
31
+ )
32
+
33
+ # loads other rules Rules Scala depends on
34
+ load ("@io_bazel_rules_scala//scala:scala.bzl" , "rules_scala_toolchain_deps_repositories" )
35
+
36
+ rules_scala_toolchain_deps_repositories ()
37
+
38
+ load ("@io_bazel_rules_scala//scala:toolchains.bzl" , "scala_register_toolchains" )
39
+
40
+ scala_register_toolchains ()
Original file line number Diff line number Diff line change
1
+ load ("@io_bazel_rules_scala//scala:scala.bzl" , "scala_library" )
2
+
3
+ # A collection of arbitrarily chosen backward- and forward-incompatible code.
4
+ # This simply tests if the proper compiler is assigned, according to Scala version setting.
5
+
6
+ # What's new in 3.3
7
+ scala_library (
8
+ name = "since_3_3" ,
9
+ srcs = ["since_3_3.scala" ],
10
+ scala_version = "3.3.1" ,
11
+ )
12
+
13
+ scala_library (
14
+ name = "before_3_3" ,
15
+ srcs = ["before_3_3.scala" ],
16
+ scala_version = "3.2.1" ,
17
+ )
18
+
19
+ # What's new in 3.2
20
+ scala_library (
21
+ name = "since_3_2" ,
22
+ srcs = ["since_3_2.scala" ],
23
+ scala_version = "3.2.1" ,
24
+ )
25
+
26
+ scala_library (
27
+ name = "before_3_2" ,
28
+ srcs = ["before_3_2.scala" ],
29
+ scala_version = "3.1.0" ,
30
+ )
31
+
32
+ # What's new in 3.1
33
+ scala_library (
34
+ name = "since_3_1" ,
35
+ srcs = ["since_3_1.scala" ],
36
+ scala_version = "3.1.0" ,
37
+ )
38
+
39
+ scala_library (
40
+ name = "scala_3_3" ,
41
+ srcs = [
42
+ "since_3_1.scala" ,
43
+ "since_3_2.scala" ,
44
+ "since_3_3.scala" ,
45
+ ],
46
+ scala_version = "3.3.1" ,
47
+ )
48
+
49
+ scala_library (
50
+ name = "scala_3_2" ,
51
+ srcs = [
52
+ "before_3_3.scala" ,
53
+ "since_3_1.scala" ,
54
+ "since_3_2.scala" ,
55
+ ],
56
+ scala_version = "3.2.1" ,
57
+ )
58
+
59
+ scala_library (
60
+ name = "scala_3_1" ,
61
+ srcs = [
62
+ "before_3_2.scala" ,
63
+ "before_3_3.scala" ,
64
+ "since_3_1.scala" ,
65
+ ],
66
+ scala_version = "3.1.0" ,
67
+ )
Original file line number Diff line number Diff line change
1
+ class Example (using String )(i : Int )
2
+ given String = " something"
3
+ val instance = Example ()(6 )
Original file line number Diff line number Diff line change
1
+ class Outer :
2
+ type Inner
3
+
4
+ inline def method (inline param : Outer ): param.Inner = ???
Original file line number Diff line number Diff line change
1
+ type Choice [A ] = A match { case Int => Long ; case Long => Int }
Original file line number Diff line number Diff line change
1
+ class Example (using String )(i : Int )
2
+ given String = " something"
3
+ val instance = Example (6 )
Original file line number Diff line number Diff line change
1
+ import util .boundary , boundary .break
You can’t perform that action at this time.
0 commit comments