Skip to content

Commit 1898963

Browse files
committed
Review feedback.
1 parent 6bb34ff commit 1898963

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

3rdparty/jvm/com/google/guava/BUILD

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ jvm_artifact(
22
group="com.google.guava",
33
artifact="guava",
44
version="31.0.1-jre",
5-
# Because `guava` provides a package which does not match its `group`, we explicitly list it here,
6-
# which allows inference to recognize that imports of this package are provided by this artifact.
5+
# Because `guava` provides a package which does not match its `group`, we explicitly list it
6+
# here, which allows inference to recognize that imports of this package are provided by this
7+
# artifact. See https://www.pantsbuild.org/v2.9/docs/reference-jvm_artifact#codepackagescode
8+
# for more information.
79
packages=["com.google.common.**"],
810
)

3rdparty/jvm/com/lihaoyi/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ jvm_artifact(
33
group="com.lihaoyi",
44
artifact="acyclic_2.13",
55
version="0.2.1",
6+
# Because `acyclic` provides a package which does not match its `group`, we explicitly list it
7+
# here, which allows inference to recognize that imports of this package are provided by this
8+
# artifact. See https://www.pantsbuild.org/v2.9/docs/reference-jvm_artifact#codepackagescode
9+
# for more information.
610
packages=["acyclic.**"],
711
)

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ See the first
77
for some unique
88
benefits Pants brings to Java and Scala projects.
99

10+
This repository demonstrates a mix of Java and Scala, which is a common use case. But the Java
11+
and Scala backends can be independently enabled, so there is no need to expose Scala BUILD file
12+
symbols if you have a pure-Java repository. See comments in the `backends` section of
13+
[`pants.toml`](./pants.toml).
14+
1015
This is only one possible way of laying out your project with Pants. See
1116
[pantsbuild.org/docs/source-roots#examples](https://www.pantsbuild.org/docs/source-roots#examples)
1217
for some other example layouts.

pants.toml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
[GLOBAL]
5-
pants_version = "2.9.0rc0"
5+
pants_version = "2.9.0rc1"
66
backend_packages = [
7-
"pants.backend.experimental.scala",
8-
"pants.backend.experimental.scala.lint.scalafmt",
7+
# This repository demonstrates a mix of Java and Scala, and so both backends are enabled. But each
8+
# backend can be used independently, so there is no need to expose Scala BUILD file
9+
# symbols if you have a pure-Java repository.
10+
#
11+
# Linters/formatters are also hosted in independent backends, to allow them to be independently
12+
# enabled.
913
"pants.backend.experimental.java",
1014
"pants.backend.experimental.java.lint.google_java_format",
15+
"pants.backend.experimental.scala",
16+
"pants.backend.experimental.scala.lint.scalafmt",
1117
]
1218

1319
[javac]

0 commit comments

Comments
 (0)