Skip to content

Commit d18169c

Browse files
authored
Update docs site for version 2.29.0.dev0 (#399)
1 parent aa412b6 commit d18169c

199 files changed

Lines changed: 1902 additions & 1142 deletions

File tree

Some content is hidden

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

docs/docs/javascript/overview/package.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,36 @@ Similarly, build scripts can be introduced to Pants via the
6565
as a way to introduce artifacts generated via bundlers and/or compilers installed and ran via your package manager.
6666
The result can the be consumed by other targets as either `resource`-targets that can be depended on,
6767
or as a package for the [docker backend](../../docker/index.mdx).
68+
69+
### Running
70+
71+
Runnable scripts can be specified and invoked through Pants via the `run` goal. This is meant to support scripts
72+
that are not directly tied to testing or packaging workflows.
73+
74+
Given a `package.json` that defines a runnable script, e.g.
75+
76+
```json title="package.json"
77+
{
78+
"name": "@my-company/pkg",
79+
"scripts": {
80+
"start": "node server.js"
81+
}
82+
}
83+
```
84+
85+
we can define the build symbol [`node_run_script`](../../../reference/build-file-symbols/node_run_script), e.g.
86+
87+
```python title="BUILD"
88+
package_json(
89+
name="pkg",
90+
scripts=[
91+
node_run_script(entry_point="start"),
92+
],
93+
)
94+
```
95+
96+
which allows us to run the script via the `pants` cli, e.g.
97+
98+
```sh title="Shell"
99+
pants run :pkg#start
100+
```

docs/docs/jvm/java-and-scala.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ jvm-default = "semanticdb"
441441
:::note Scalafix and Scala 3
442442
At the moment the support for Scalac 3 in Scalafix is limited, most of the syntactic rules work but not that many in the semantic front.
443443

444-
Despite those raugh edges, Scalafix is a great linting tool for Scala 3, just note that the setup is different than from prior versions: Instead of adding a scalac plugin to our build, we only need to add the `-Xsemanticdb` flag to our `[scalac].args` settings to enable the generation of `.semanticdb` compiled files.
444+
Despite those rough edges, Scalafix is a great linting tool for Scala 3, just note that the setup is different than from prior versions: Instead of adding a scalac plugin to our build, we only need to add the `-Xsemanticdb` flag to our `[scalac].args` settings, or or the appropriate entry in `[scalac].args_for_resolve, to enable the generation of `.semanticdb` compiled files.
445445
:::
446446

447447
## Working in an IDE

docs/reference/build-file-symbols/__defaults__.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol";
1010

1111
Provide default field values.
1212

13-
Learn more https://www.pantsbuild.org/2.28/docs/using-pants/key-concepts/targets-and-build-files#field-default-values
13+
Learn more https://www.pantsbuild.org/2.29/docs/using-pants/key-concepts/targets-and-build-files#field-default-values
1414

1515
</BuildFileSymbol>

docs/reference/build-file-symbols/node_build_script.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: |
66

77
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol";
88

9-
<BuildFileSymbol name={`node_build_script`} signature={`(entry_point: 'str', output_directories: 'Iterable[str]' = (), output_files: 'Iterable[str]' = (), extra_caches: 'Iterable[str]' = (), extra_env_vars: 'Iterable[str]' = ()) -> 'NodeBuildScript'`}>
9+
<BuildFileSymbol name={`node_build_script`} signature={`(entry_point: 'str', output_directories: 'Iterable[str]' = (), output_files: 'Iterable[str]' = (), extra_caches: 'Iterable[str]' = (), extra_env_vars: 'Iterable[str]' = (), description: 'str | None' = None, tags: 'Iterable[str]' = ()) -> 'NodeBuildScript'`}>
1010

1111
A build script, mapped from the `scripts` section of a package.json file.
1212

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: node_run_script
3+
description: |
4+
A script that can be run directly via the run goal, mapped from the `scripts` section of a package.json file.
5+
---
6+
7+
import BuildFileSymbol from "@site/src/components/reference/BuildFileSymbol";
8+
9+
<BuildFileSymbol name={`node_run_script`} signature={`(entry_point: 'str', extra_env_vars: 'Iterable[str]' = ()) -> 'NodeRunScript'`}>
10+
11+
A script that can be run directly via the run goal, mapped from the `scripts` section of a package.json file.
12+
13+
This allows running any script defined in package.json directly through pants run.
14+
15+
</BuildFileSymbol>

docs/reference/global-options.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ remote_provider = <RemoteProvider>`}
212212
default_repr={`reapi`}
213213
>
214214

215-
The type of provider to use, if using a remote cache and/or remote execution, See https://www.pantsbuild.org/2.28/docs/using-pants/remote-caching-and-execution for details.
215+
The type of provider to use, if using a remote cache and/or remote execution, See https://www.pantsbuild.org/2.29/docs/using-pants/remote-caching-and-execution for details.
216216

217217
Each provider supports different `remote_store_address` and (optional) `remote_execution_address` URIs.
218218

@@ -288,7 +288,7 @@ tag = [
288288
default_repr={`[]`}
289289
>
290290

291-
Include only targets with these tags (optional &#x27;+&#x27; prefix) or without these tags (&#x27;-&#x27; prefix). See https://www.pantsbuild.org/2.28/docs/using-pants/advanced-target-selection.
291+
Include only targets with these tags (optional &#x27;+&#x27; prefix) or without these tags (&#x27;-&#x27; prefix). See https://www.pantsbuild.org/2.29/docs/using-pants/advanced-target-selection.
292292

293293
</Option>
294294

@@ -348,7 +348,7 @@ build_file_prelude_globs = [
348348
default_repr={`[]`}
349349
>
350350

351-
Python files to evaluate and whose symbols should be exposed to all BUILD files. See https://www.pantsbuild.org/2.28/docs/writing-plugins/macros.
351+
Python files to evaluate and whose symbols should be exposed to all BUILD files. See https://www.pantsbuild.org/2.29/docs/writing-plugins/macros.
352352

353353
</Option>
354354

@@ -408,7 +408,7 @@ Path to a file containing PEM-format CA certificates used for verifying secure c
408408

409409
Even when using the `docker_environment` and `remote_environment` targets, this path will be read from the local host, and those certs will be used in the environment.
410410

411-
This option cannot be overridden via environment targets, so if you need a different value than what the rest of your organization is using, override the value via an environment variable, CLI argument, or `.pants.rc` file. See https://www.pantsbuild.org/2.28/docs/using-pants/key-concepts/options.
411+
This option cannot be overridden via environment targets, so if you need a different value than what the rest of your organization is using, override the value via an environment variable, CLI argument, or `.pants.rc` file. See https://www.pantsbuild.org/2.29/docs/using-pants/key-concepts/options.
412412

413413
</Option>
414414

@@ -834,7 +834,7 @@ pants_version = <str>`}
834834

835835
Use this Pants version. Note that Pants only uses this to verify that you are using the requested version, as Pants cannot dynamically change the version it is using once the program is already running.
836836

837-
If you use the `pants` script from https://www.pantsbuild.org/2.28/docs/getting-started/installing-pants, however, changing the value in your `pants.toml` will cause the new version to be installed and run automatically.
837+
If you use the `pants` script from https://www.pantsbuild.org/2.29/docs/getting-started/installing-pants, however, changing the value in your `pants.toml` will cause the new version to be installed and run automatically.
838838

839839
Run `pants --version` to check what is being used.
840840

@@ -1353,7 +1353,7 @@ An oauth token to use for gGRPC connections to `[GLOBAL].remote_execution_addres
13531353

13541354
If specified, Pants will add a header in the format `authorization: Bearer <token>`. You can also manually add this header via `[GLOBAL].remote_execution_headers` and `[GLOBAL].remote_store_headers`, or use `[GLOBAL].remote_auth_plugin` to provide a plugin to dynamically set the relevant headers. Otherwise, no authorization will be performed.
13551355

1356-
Recommendation: do not place a token directly in `pants.toml`, instead do one of: set the token via the environment variable (`PANTS_REMOTE_OAUTH_BEARER_TOKEN`), CLI option (`--remote-oauth-bearer-token`), or store the token in a file and set the option to `"@/path/to/token.txt"` to [read the value from that file](https://www.pantsbuild.org/2.28/docs/using-pants/key-concepts/options#reading-individual-option-values-from-files).
1356+
Recommendation: do not place a token directly in `pants.toml`, instead do one of: set the token via the environment variable (`PANTS_REMOTE_OAUTH_BEARER_TOKEN`), CLI option (`--remote-oauth-bearer-token`), or store the token in a file and set the option to `"@/path/to/token.txt"` to [read the value from that file](https://www.pantsbuild.org/2.29/docs/using-pants/key-concepts/options#reading-individual-option-values-from-files).
13571357

13581358
</Option>
13591359

docs/reference/goals/fix.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ This goal runs tools that make &#x27;semantic&#x27; changes to source code, wher
1919

2020
See also:
2121

22-
- [The `fmt` goal](https://www.pantsbuild.org/2.28/reference/goals/fix will run code-editing tools that may make only
22+
- [The `fmt` goal](https://www.pantsbuild.org/2.29/reference/goals/fix will run code-editing tools that may make only
2323
syntactic changes, not semantic ones. The `fix` includes running these `fmt` tools by
2424
default (see [the `skip_formatters` option](#skip_formatters) to control this).
2525

26-
- [The `lint` goal](https://www.pantsbuild.org/2.28/reference/goals/lint) will validate code is formatted, by running these
26+
- [The `lint` goal](https://www.pantsbuild.org/2.29/reference/goals/lint) will validate code is formatted, by running these
2727
fixers and checking there&#x27;s no change.
2828

2929
- Documentation about formatters for various ecosystems, such as:
30-
[Python](https://www.pantsbuild.org/2.28/docs/python/overview/linters-and-formatters), [JVM](https://www.pantsbuild.org/jvm/java-and-scala#lint-and-format),
31-
[SQL](https://www.pantsbuild.org/2.28/docs/sql#enable-sqlfluff-linter)
30+
[Python](https://www.pantsbuild.org/2.29/docs/python/overview/linters-and-formatters), [JVM](https://www.pantsbuild.org/jvm/java-and-scala#lint-and-format),
31+
[SQL](https://www.pantsbuild.org/2.29/docs/sql#enable-sqlfluff-linter)
3232

3333
Backend: <span className="color--primary">`pants.core`</span>
3434

docs/reference/goals/fmt.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ This goal runs tools that make &#x27;syntactic&#x27; changes to source code, whe
1919

2020
See also:
2121

22-
- [The `fix` goal](https://www.pantsbuild.org/2.28/reference/goals/fix) will run code-editing tools that may make semantic
22+
- [The `fix` goal](https://www.pantsbuild.org/2.29/reference/goals/fix) will run code-editing tools that may make semantic
2323
changes, not just syntactic ones.
2424

25-
- [The `lint` goal](https://www.pantsbuild.org/2.28/reference/goals/lint) will validate code is formatted, by running these
25+
- [The `lint` goal](https://www.pantsbuild.org/2.29/reference/goals/lint) will validate code is formatted, by running these
2626
formatters and checking there&#x27;s no change.
2727

2828
- Documentation about formatters for various ecosystems, such as:
29-
[Python](https://www.pantsbuild.org/2.28/docs/python/overview/linters-and-formatters), [Go](https://www.pantsbuild.org/2.28/docs/go#gofmt),
30-
[JVM](https://www.pantsbuild.org/jvm/java-and-scala#lint-and-format), [Shell](https://www.pantsbuild.org/2.28/docs/shell#shfmt-autoformatter).
29+
[Python](https://www.pantsbuild.org/2.29/docs/python/overview/linters-and-formatters), [Go](https://www.pantsbuild.org/2.29/docs/go#gofmt),
30+
[JVM](https://www.pantsbuild.org/jvm/java-and-scala#lint-and-format), [Shell](https://www.pantsbuild.org/2.29/docs/shell#shfmt-autoformatter).
3131

3232
Backend: <span className="color--primary">`pants.core`</span>
3333

docs/reference/goals/lint.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ This goal runs tools that check code quality/styling etc, without changing that
1919

2020
See also:
2121

22-
- [The `fmt` goal](https://www.pantsbuild.org/2.28/reference/goals/fix will save the the result of formatters
22+
- [The `fmt` goal](https://www.pantsbuild.org/2.29/reference/goals/fix will save the the result of formatters
2323
(code-editing tools that make only &#x22;syntactic&#x22; changes) back to the workspace.
2424

25-
- [The `fmt` goal](https://www.pantsbuild.org/2.28/reference/goals/fix will save the the result of fixers
25+
- [The `fmt` goal](https://www.pantsbuild.org/2.29/reference/goals/fix will save the the result of fixers
2626
(code-editing tools that may make &#x22;semantic&#x22; changes too) back to the workspace.
2727

2828
- Documentation about linters for various ecosystems, such as:
29-
[Python](https://www.pantsbuild.org/2.28/docs/python/overview/linters-and-formatters), [Go](https://www.pantsbuild.org/2.28/docs/go),
30-
[JVM](https://www.pantsbuild.org/jvm/java-and-scala#lint-and-format), [Shell](https://www.pantsbuild.org/2.28/docs/shell),
31-
[Docker](https://www.pantsbuild.org/2.28/docs/docker#linting-dockerfiles-with-hadolint).
29+
[Python](https://www.pantsbuild.org/2.29/docs/python/overview/linters-and-formatters), [Go](https://www.pantsbuild.org/2.29/docs/go),
30+
[JVM](https://www.pantsbuild.org/jvm/java-and-scala#lint-and-format), [Shell](https://www.pantsbuild.org/2.29/docs/shell),
31+
[Docker](https://www.pantsbuild.org/2.29/docs/docker#linting-dockerfiles-with-hadolint).
3232

3333
Backend: <span className="color--primary">`pants.core`</span>
3434

docs/reference/goals/tailor.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ key2 = val2
5353
default_repr={`{}`}
5454
>
5555

56-
A mapping from standard target type to custom type to use instead. The custom type can be a custom target type or a macro that offers compatible functionality to the one it replaces (see https://www.pantsbuild.org/2.28/docs/writing-plugins/macros).
56+
A mapping from standard target type to custom type to use instead. The custom type can be a custom target type or a macro that offers compatible functionality to the one it replaces (see https://www.pantsbuild.org/2.29/docs/writing-plugins/macros).
5757

5858
</Option>
5959

0 commit comments

Comments
 (0)