Skip to content

Commit

Permalink
Restructure JVM docs.
Browse files Browse the repository at this point in the history
Previously the top-level menu was called
"Java and Scala" and "Kotlin" was a subpage.

Now the top-level is called "JVM" and there
are two subpages - "Java and Scala", and "Kotlin".
  • Loading branch information
benjyw committed Feb 13, 2024
1 parent e37ecb7 commit 67988f3
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/docs/introduction/welcome-to-pants.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Pants is designed for fast, consistent, ergonomic builds. Some noteworthy featur

## Which languages and frameworks does Pants support?

- Pants [ships](page:language-support) with support for [Python](../python/overview/index.mdx), [Go](../go/index.mdx), [Java](../java-and-scala/index.mdx), [Scala](../java-and-scala/index.mdx) and [Shell](../shell/index.mdx).
- Pants [ships](page:language-support) with support for [Python](../python/overview/index.mdx), [Go](../go/index.mdx), [Java](../jvm/java-and-scala.mdx), [Scala](../jvm/java-and-scala.mdx), [Kotlin](../jvm/kotlin.mdx), and [Shell](../shell/index.mdx).
- Pants supports a wide range of code generators (such as Thrift, Protobuf, Scrooge and Avro), linters and formatters, and it is easy to add support for new or custom ones
- Pants can create standalone binaries, [Docker images](../docker/index.mdx), AWS Lambdas and GCP Cloud Functions

Expand Down
4 changes: 0 additions & 4 deletions docs/docs/java-and-scala/_category_.json

This file was deleted.

4 changes: 4 additions & 0 deletions docs/docs/jvm/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "JVM",
"position": 7
}
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions docs/docs/using-pants/key-concepts/backends.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ The list of all backends (both stable and experimental) is also available via `p
| `pants.backend.experimental.go.lint.vet` | Enables support for running `go vet` | [Go overview](../../go/index.mdx) |
| `pants.backend.experimental.helm` | Enables core Helm support: [https://helm.sh](https://helm.sh) | [Helm overview](../../helm/index.mdx) |
| `pants.backend.experimental.helm.check.kubeconfirm` | Enables Kubeconform, a fast Kubernetes manifest validator: [https://github.com/yannh/kubeconform](https://github.com/yannh/kubeconform) | [Helm overview](../../helm/index.mdx) |
| `pants.backend.experimental.java` | Enables core Java support. | [Java & Scala overview](../../java-and-scala/index.mdx) |
| `pants.backend.experimental.java.debug_goals` | Enable additional goals for introspecting Java targets | [Java & Scala overview](../../java-and-scala/index.mdx) |
| `pants.backend.experimental.java.lint.google_java_format` | Enables Google Java Format. | [Java & Scala overview](../../java-and-scala/index.mdx) |
| `pants.backend.experimental.java` | Enables core Java support. | [Java & Scala overview](../../jvm/java-and-scala.mdx) |
| `pants.backend.experimental.java.debug_goals` | Enable additional goals for introspecting Java targets | [Java & Scala overview](../../jvm/java-and-scala.mdx) |
| `pants.backend.experimental.java.lint.google_java_format` | Enables Google Java Format. | [Java & Scala overview](../../jvm/java-and-scala.mdx) |
| `pants.backend.experimental.javascript` | Enables core JavaScript support. | |
| `pants.backend.experimental.javascript.lint.prettier` | Enables Prettier, a JavaScript (and more) autoformatter: [https://prettier.io](https://prettier.io) | |
| `pants.backend.experimental.kotlin` | Enables core Kotlin support | [Kotlin](../../java-and-scala/kotlin.mdx) |
Expand All @@ -103,9 +103,9 @@ The list of all backends (both stable and experimental) is also available via `p
| `pants.backend.experimental.python.typecheck.pyright` | Enables Pyright, a Python type checker: [https://github.com/microsoft/pyright](https://github.com/microsoft/pyright) | |
| `pants.backend.experimental.python.typecheck.pytype` | Enables Pytype, a Python type checker: [https://google.github.io/pytype/](https://google.github.io/pytype/) | |
| `pants.backend.experimental.rust` | Enables core Rust support. | |
| `pants.backend.experimental.scala` | Enables core Scala support. | [Java & Scala overview](../../java-and-scala/index.mdx) |
| `pants.backend.experimental.scala.debug_goals` | Enables additional goals for introspecting Scala targets | [Java & Scala overview](../../java-and-scala/index.mdx) |
| `pants.backend.experimental.scala.lint.scalafmt` | Enables the Scalafmt formatter. | [Java & Scala overview](../../java-and-scala/index.mdx) |
| `pants.backend.experimental.scala` | Enables core Scala support. | [Java & Scala overview](../../jvm/java-and-scala.mdx) |
| `pants.backend.experimental.scala.debug_goals` | Enables additional goals for introspecting Scala targets | [Java & Scala overview](../../jvm/java-and-scala.mdx) |
| `pants.backend.experimental.scala.lint.scalafmt` | Enables the Scalafmt formatter. | [Java & Scala overview](../../jvm/java-and-scala.mdx) |
| `pants.backend.experimental.swift` | Enables core Swift support. | |
| `pants.backend.experimental.terraform` | Enables core Terraform support. | |
| `pants.backend.experimental.terraform.lint.tfsec` | Enables tfsec, for static analysis of Terraform: [https://aquasecurity.github.io/tfsec/](https://aquasecurity.github.io/tfsec/) | |
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/using-pants/troubleshooting-common-issues.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ Is the missing import from first-party code? Common issues:
Common issues with both first and third-party imports:

- Ambiguity. >1 target exposes the same module/package.
- If it's a third-party dependency, you should likely use multiple "resolves" (lockfiles). Each resolve should have no more than one of the same requirement. See [Python](../python/overview/lockfiles.mdx#multiple-lockfiles) and [JVM](../java-and-scala/index.mdx).
- If it's a third-party dependency, you should likely use multiple "resolves" (lockfiles). Each resolve should have no more than one of the same requirement. See [Python](../python/overview/lockfiles.mdx#multiple-lockfiles) and [JVM](../jvm/java-and-scala.mdx).
- If it's a first-party dependency, you may have unintentionally created multiple targets owning the same file. Run `pants list path/to/file.ext` to see all owners. This often happens from overlapping `sources` fields. If this was intentional, follow the instructions in the ambiguity warning to disambiguate via the `dependencies` field.
- Some target types like `resources` and `files` often need to be explicitly added to the `dependencies` field and cannot be inferred (yet).
- Multiple resolves (Python and JVM).
- A target can only depend on targets that share the same "resolve" (lockfile).
- Pants will warn when it detects that the import exists in another resolve. This usually implies you should either change the current target's `resolve` field, or use the `parametrize()` mechanism so that the code works with multiple resolves.
- See [Python](../python/overview/lockfiles.mdx#multiple-lockfiles) and [JVM](../java-and-scala/index.mdx).
- See [Python](../python/overview/lockfiles.mdx#multiple-lockfiles) and [JVM](../jvm/java-and-scala.mdx).

When debugging dependency inference, it can help to explicitly add the problematic dependency to the `dependencies` field to see if it gets the code running. If so, you can then try to figure out why dependency inference is not working.

Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/notes/2.19.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Dependency inference for Java now supports code using recently added syntax like

##### Scala

Scala 3 is now supported when using [the BSP in an IDE](https://www.pantsbuild.org/2.19/docs/java-and-scala#working-in-an-ide).
Scala 3 is now supported when using [the BSP in an IDE](https://www.pantsbuild.org/2.19/docs/jvm/java-and-scala#working-in-an-ide).

#### OpenAPI

Expand Down

0 comments on commit 67988f3

Please sign in to comment.