Skip to content

Commit a0f54ba

Browse files
fix(ci): migrate .trunk/trunk.yaml to the 0.1 schema
Trunk Check has been failing on every PR with config-error findings: the legacy pre-0.1 schema keys (linters/formatters/actions/cache/env) are unrecognized by the pinned CLI 1.22.2. Migrate to the modern schema, preserving the repo's linting intent: - version: 0.1, cli.version: 1.22.2, plugin source uri added - lint.definitions: repo-specific command overrides (black line length 100 for lint+format, clippy --all-targets --all-features -D warnings) merged over the trunk plugin definitions - lint.enabled: same 12 tools as before (plugin defaults otherwise) - lint.ignore: scope prettier/yamllint off .github/workflows/** - those files are covered by actionlint; prettier re-indents `on:`-keyed workflow files with a nonstandard style and yamllint's 80-column default flags long action refs - actions.enabled: trunk-check-pre-push (modern successor of the old trunk-check action) Also fix the issues the freshly-running tools surfaced on this branch's diff: - actionlint: drop invalid `deployment` key under `environment` and quote the `--build_metadata=COMMIT_SHA=$(git rev-parse HEAD)` array element (SC2207) in v8-canary.yml and rusty-v8-release.yml - taplo: add .taplo.toml declaring the repo's 4-space array indent and expand the tonic features array to match taplo's output - add .trunk/.gitignore for trunk's local runtime state (canonical set from trunk-io/plugins) Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent eeaab31 commit a0f54ba

6 files changed

Lines changed: 79 additions & 51 deletions

File tree

.github/workflows/rusty-v8-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ jobs:
6666
actions: read
6767
environment:
6868
name: bazel
69-
deployment: false
7069
strategy:
7170
fail-fast: false
7271
matrix:
@@ -202,7 +201,7 @@ jobs:
202201
--config=rusty-v8-upstream-libcxx
203202
"--config=v8-target-${V8_CPU}"
204203
"${pair_target}"
205-
--build_metadata=COMMIT_SHA=$(git rev-parse HEAD)
204+
"--build_metadata=COMMIT_SHA=$(git rev-parse HEAD)"
206205
)
207206
if [[ "${SANDBOX}" != "true" ]]; then
208207
bazel_args+=(--config=v8-release-compat)

.github/workflows/v8-canary.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ jobs:
110110
actions: read
111111
environment:
112112
name: bazel
113-
deployment: false
114113
strategy:
115114
fail-fast: false
116115
matrix:
@@ -245,7 +244,7 @@ jobs:
245244
"--config=v8-target-${V8_CPU}"
246245
"${pair_target}"
247246
--verbose_failures
248-
--build_metadata=COMMIT_SHA=$(git rev-parse HEAD)
247+
"--build_metadata=COMMIT_SHA=$(git rev-parse HEAD)"
249248
)
250249
if [[ "${SANDBOX}" != "true" ]]; then
251250
bazel_args+=(--config=v8-release-compat)

.taplo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# TOML formatting style for this repository (used by the `taplo` linter in
2+
# .trunk/trunk.yaml). The existing Cargo.toml files indent array entries
3+
# with 4 spaces, so keep taplo aligned with that instead of its 2-space
4+
# default.
5+
[formatting]
6+
indent_string = " "

.trunk/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*out
2+
*logs
3+
*actions
4+
*notifications
5+
*tools
6+
plugins
7+
user_trunk.yaml
8+
user.yaml

.trunk/trunk.yaml

Lines changed: 59 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# =============================================================================
23
# Trunk.io — Plugin versions for linting/formatting tools
34
# =============================================================================
@@ -9,60 +10,72 @@ version: 0.1
910

1011
# CLI version pinned for reproducible runs (matches the version CI downloads).
1112
cli:
12-
version: 1.22.2
13+
version: 1.22.2
1314

1415
# The `trunk` plugin provides the linter/formatter definitions used below.
1516
# User definitions merge over the plugin: fields set in this file override the
1617
# plugin, everything else (files, tools, runtimes, version pins) is inherited.
1718
plugins:
18-
sources:
19-
- id: trunk
20-
ref: v1.2.2
21-
uri: https://github.com/trunk-io/plugins
19+
sources:
20+
- id: trunk
21+
ref: v1.2.2
22+
uri: https://github.com/trunk-io/plugins
2223

2324
lint:
24-
# Repo-specific command overrides merged over the plugin definitions.
25-
definitions:
26-
# black: enforce 100-char line length in both lint and format modes.
27-
- name: black
28-
commands:
29-
- name: lint
30-
output: pass_fail
31-
run: black --check --line-length 100 ${target}
32-
success_codes: [0, 1]
33-
- name: format
34-
output: rewrite
35-
run: black --line-length 100 ${target}
36-
success_codes: [0]
37-
batch: true
38-
in_place: true
39-
formatter: true
40-
# clippy: lint all targets/features and fail on any warning.
41-
- name: clippy
42-
commands:
43-
- name: lint
44-
output: clippy
45-
target: ${parent_with(Cargo.toml)}
46-
run: cargo clippy --message-format json --all-targets --all-features --locked -- -D warnings
47-
success_codes: [0, 101, 383]
48-
disable_upstream: true
25+
# Repo-specific command overrides merged over the plugin definitions.
26+
definitions:
27+
# black: enforce 100-char line length in both lint and format modes.
28+
- name: black
29+
commands:
30+
- name: lint
31+
output: pass_fail
32+
run: black --check --line-length 100 ${target}
33+
success_codes: [0, 1]
34+
- name: format
35+
output: rewrite
36+
run: black --line-length 100 ${target}
37+
success_codes: [0]
38+
batch: true
39+
in_place: true
40+
formatter: true
41+
# clippy: lint all targets/features and fail on any warning.
42+
- name: clippy
43+
commands:
44+
- name: lint
45+
output: clippy
46+
target: ${parent_with(Cargo.toml)}
47+
run: >
48+
cargo clippy --message-format json --all-targets
49+
--all-features
50+
--locked -- -D warnings
51+
success_codes: [0, 101, 383]
52+
disable_upstream: true
4953

50-
# Enabled tools (plugin defaults unless overridden above).
51-
enabled:
52-
- actionlint
53-
- black
54-
- clippy
55-
- eslint
56-
- golangci-lint
57-
- mypy
58-
- prettier
59-
- ruff
60-
- rustfmt
61-
- shellcheck
62-
- taplo
63-
- yamllint
54+
# Enabled tools (plugin defaults unless overridden above).
55+
enabled:
56+
- actionlint
57+
- black
58+
- clippy
59+
- eslint
60+
- golangci-lint
61+
- mypy
62+
- prettier
63+
- ruff
64+
- rustfmt
65+
- shellcheck
66+
- taplo
67+
- yamllint
68+
69+
# GitHub workflow files are covered by actionlint (syntax + shellcheck).
70+
# prettier's YAML printer re-indents `on:`-keyed workflow files with a
71+
# nonstandard style, and yamllint's 80-column default flags long action
72+
# refs; neither reflects this repo's intent, so scope both off workflows.
73+
ignore:
74+
- linters: [prettier, yamllint]
75+
paths:
76+
- .github/workflows/**
6477

6578
# Git hooks: run `trunk check` before `git push`.
6679
actions:
67-
enabled:
68-
- trunk-check-pre-push
80+
enabled:
81+
- trunk-check-pre-push

codex-rs/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,10 @@ tokio-tungstenite = { version = "0.28.0", features = [
373373
"rustls-tls-native-roots",
374374
] }
375375
tokio-util = "0.7.18"
376-
tonic = { version = "0.14.3", default-features = false, features = ["channel", "codegen"] }
376+
tonic = { version = "0.14.3", default-features = false, features = [
377+
"channel",
378+
"codegen",
379+
] }
377380
tonic-prost = "0.14.3"
378381
toml = "0.9.5"
379382
toml_edit = "0.24.0"

0 commit comments

Comments
 (0)