Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit df63671

Browse files
committed
Zinc 1.4.2 (#1)
Co-authored-by: Timothy Klim <git@timothyklim.com>
1 parent ff423d8 commit df63671

File tree

152 files changed

+3779
-8080
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+3779
-8080
lines changed

.bazelrc_shared

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ common --announce_rc
22
common --color=yes
33

44
build --experimental_strict_action_env
5-
build --javacopt="-source 8 -target 8"
5+
build --javacopt="-source 11 -target 11"
66

77
build --strategy=ScalaCompile=worker
88
build --worker_max_instances=4

.scalafmt.conf

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1-
align.openParenCallSite = false
2-
align.openParenDefnSite = false
3-
continuationIndent.defnSite = 2
4-
danglingParentheses = true
5-
docstrings = JavaDoc
6-
importSelectors = singleLine
7-
maxColumn = 120
8-
verticalMultiline.newlineBeforeImplicitKW = true
9-
rewrite.redundantBraces.stringInterpolation = true
10-
rewrite.rules = [
11-
RedundantParens,
12-
PreferCurlyFors,
13-
SortImports
14-
]
15-
unindentTopLevelOperators = false
1+
version = 2.6.4
2+
maxColumn = 150
3+
assumeStandardLibraryStripMargin = true
4+
continuationIndent.callSite = 2
5+
includeCurlyBraceInSelectChains = true
6+
# includeNoParensInSelectChains = true
7+
binPack.literalArgumentLists = false
8+
rewrite.rules = [AvoidInfix, SortImports, SortModifiers, RedundantParens, PreferCurlyFors] # RedundantBraces
9+
10+
project.git = true
11+
12+
newlines {
13+
alwaysBeforeCurlyBraceLambdaParams = false
14+
implicitParamListModifierPrefer = before
15+
}
16+
17+
align = none
18+
align {
19+
preset = none
20+
stripMargin = true
21+
openParenCallSite = false
22+
openParenDefnSite = false
23+
tokens = [
24+
"%", "%%", "%%%", ":=", "~=", "=>"
25+
]
26+
}
27+
# optIn.breakChainOnFirstMethodDot = true

BUILD

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +0,0 @@
1-
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
2-
3-
buildifier(
4-
name = "buildifier",
5-
)
6-
7-
buildifier(
8-
name = "buildifier_check",
9-
mode = "check",
10-
)

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
bzl-lint:
2+
find . -type f -iname "*.bazel" -o -iname "*.bzl" -o -iname BUILD -o -iname WORKSPACE | xargs buildifier --lint=warn --warnings=all
3+
4+
bzl-fmt:
5+
find . -type f -iname "*.bazel" -o -iname "*.bzl" -o -iname BUILD -o -iname WORKSPACE xargs buildifier
6+
7+
nix-fmt:
8+
find . -name "*.nix" | xargs nixpkgs-fmt
9+
10+
scala-fmt:
11+
scalafmt -c .scalafmt.conf --mode changed --non-interactive --quiet .
12+
13+
fmt: scala-fmt nix-fmt bzl-fmt

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ protobuf_deps()
116116
# Specify the scala compiler we wish to use; in this case, we'll use the default one specified in rules_scala_annex
117117
bind(
118118
name = "default_scala",
119-
actual = "@rules_scala_annex//src/main/scala:zinc_2_12_10",
119+
actual = "@rules_scala_annex//src/main/scala:zinc_2_13",
120120
)
121121
```
122122

WORKSPACE

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,6 @@ http_archive(
1313
url = "https://github.com/bazelbuild/skydoc/archive/{}.zip".format(skydoc_tag),
1414
)
1515

16-
# com_github_bazelbuild_buildtools
17-
18-
buildtools_tag = "0.29.0"
19-
20-
buildtools_sha256 = "05eb52437fb250c7591dd6cbcfd1f9b5b61d85d6b20f04b041e0830dd1ab39b3"
21-
22-
http_archive(
23-
name = "com_github_bazelbuild_buildtools",
24-
sha256 = buildtools_sha256,
25-
strip_prefix = "buildtools-{}".format(buildtools_tag),
26-
url = "https://github.com/bazelbuild/buildtools/archive/{}.zip".format(buildtools_tag),
27-
)
28-
29-
load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")
30-
31-
buildifier_dependencies()
32-
33-
# io_bazel_rules_go
34-
35-
rules_go_tag = "v0.20.2"
36-
37-
rules_go_sha256 = "b9aa86ec08a292b97ec4591cf578e020b35f98e12173bbd4a921f84f583aebd9"
38-
39-
http_archive(
40-
name = "io_bazel_rules_go",
41-
sha256 = rules_go_sha256,
42-
urls = [
43-
"https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/{tag}/rules_go-{tag}.tar.gz".format(tag = rules_go_tag),
44-
"https://github.com/bazelbuild/rules_go/releases/download/{tag}/rules_go-{tag}.tar.gz".format(tag = rules_go_tag),
45-
],
46-
)
47-
48-
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
49-
50-
go_rules_dependencies()
51-
52-
go_register_toolchains()
53-
5416
bazel_skylib_tag = "1.0.2"
5517

5618
bazel_skylib_sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44"

annex_install.json

Lines changed: 1557 additions & 5586 deletions
Large diffs are not rendered by default.

annex_proto_install.json

Lines changed: 183 additions & 71 deletions
Large diffs are not rendered by default.

annex_scalafmt_install.json

Lines changed: 628 additions & 638 deletions
Large diffs are not rendered by default.

docs/newdocs/scala_versions.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
The scala version used by a buildable target is specified via the `ScalaConfiguration` passed in to the rule's `scala` attribute.
44

5-
This attribute defaults to using the `default_scala` specified via `bind` in the `WORKSPACE` file of the repo. For example, suppose the `ScalaConfiguration` you wish to default to is defined by `//scala:2_11_12`. In your `WORKSPACE`, you would include:
5+
This attribute defaults to using the `default_scala` specified via `bind` in the `WORKSPACE` file of the repo. For example, suppose the `ScalaConfiguration` you wish to default to is defined by `//scala:2_13_12`. In your `WORKSPACE`, you would include:
66

77
```python
88
bind(
99
name = "default_scala",
10-
actual = "//scala:2_11_12",
10+
actual = "//scala:2_13_12",
1111
)
1212
```
1313

@@ -16,46 +16,46 @@ We provide two means of creating the `ScalaConfiguration`: `configure_bootstrap_
1616
Example:
1717

1818
```python
19-
compiler_classpath_2_12_8 = [
20-
"@scala_compiler_2_12_8//jar",
21-
"@scala_library_2_12_8//jar",
22-
"@scala_reflect_2_12_8//jar",
19+
compiler_classpath_2_13_3 = [
20+
"@scala_compiler_2_13_3//jar",
21+
"@scala_library_2_13_3//jar",
22+
"@scala_reflect_2_13_3//jar",
2323
]
2424

25-
runtime_classpath_2_12_8 = [
26-
"@scala_library_2_12_8//jar",
25+
runtime_classpath_2_13_3 = [
26+
"@scala_library_2_13_3//jar",
2727
]
2828

2929
# This creates a basic ScalaConfiguration that relies on the scalac compiler
3030
configure_bootstrap_scala(
31-
name = "bootstrap_2_12_8",
32-
compiler_classpath = compiler_classpath_2_12_8,
33-
runtime_classpath = runtime_classpath_2_12_8,
34-
version = "2.12.8",
31+
name = "bootstrap_2_13_3",
32+
compiler_classpath = compiler_classpath_2_13_3,
33+
runtime_classpath = runtime_classpath_2_13_3,
34+
version = "2.13.3",
3535
visibility = ["//visibility:public"],
3636
)
3737

3838
# compiler bridge needed to configure zinc compiler
3939
scala_library(
40-
name = "compiler_bridge_2_12_8",
40+
name = "compiler_bridge_2_13_3",
4141
srcs = [
42-
"@compiler_bridge_2_12//:src",
42+
"@compiler_bridge_2_13//:src",
4343
],
44-
scala = ":bootstrap_2_12_8",
44+
scala = ":bootstrap_2_13_3",
4545
visibility = ["//visibility:public"],
46-
deps = compiler_classpath_2_12_8 + [
46+
deps = compiler_classpath_2_13_3 + [
4747
"@scala_annex_org_scala_sbt_compiler_interface//jar",
4848
"@scala_annex_org_scala_sbt_util_interface//jar",
4949
],
5050
)
5151

5252
# This augments the configuration to configure the zinc compiler
5353
configure_zinc_scala(
54-
name = "zinc_2_12_8",
55-
compiler_bridge = ":compiler_bridge_2_12_8",
56-
compiler_classpath = compiler_classpath_2_12_8,
57-
runtime_classpath = runtime_classpath_2_12_8,
58-
version = "2.12.8",
54+
name = "zinc_2_13",
55+
compiler_bridge = ":compiler_bridge_2_13_3",
56+
compiler_classpath = compiler_classpath_2_13_3,
57+
runtime_classpath = runtime_classpath_2_13_3,
58+
version = "2.13.3",
5959
visibility = ["//visibility:public"],
6060
)
6161
```
@@ -68,13 +68,13 @@ For example:
6868
scala_library(
6969
name = "example_compiled_with_scalac",
7070
srcs = glob(["**/*.scala"])
71-
scala = "<package>:bootstrap_2_12_8
71+
scala = "<package>:bootstrap_2_13_3
7272
)
7373

7474
scala_library(
7575
name = "example_compiled_with_zinc",
7676
srcs = glob(["**/*.scala"])
77-
scala = "<package>:zinc_2_12_8
77+
scala = "<package>:zinc_2_13
7878
)
7979

8080
# This would use whatever //external:default_scala points to (i.e. what you bind default_scala to in your WORKSPACE)

0 commit comments

Comments
 (0)