-
Notifications
You must be signed in to change notification settings - Fork 0
Align Dependabot coverage and add the dev-fast build fragment #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
f37ddcb
061cdc6
cc6c2f3
ec0eb8f
84ce11b
f0c40ee
726a655
1cf2242
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Canonical opt-in Cargo configuration fragment for accelerated local debug | ||
| # builds. | ||
| # | ||
| # This file is deliberately kept out of `.cargo/config.toml`. Cargo | ||
| # auto-discovers that path, so anything placed there applies to release | ||
| # packaging, coverage, and verification builds, which must keep the | ||
| # supported LLVM backend and platform linker. Copy this fragment to | ||
| # `tools/dev-fast/config.toml` and pass it explicitly with | ||
| # `cargo --config tools/dev-fast/config.toml ...` from `make dev-build` and | ||
| # `make dev-test`. | ||
| # | ||
| # Repositories that set repository-wide `rustflags` in `.cargo/config.toml` | ||
| # must restate them in the target table below: Cargo picks a single | ||
| # rustflags source rather than merging them, and a `[target.*]` table | ||
| # outranks the `[build]` table. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- tools/dev-fast/config.toml ---'
cat -n tools/dev-fast/config.toml
printf '%s\n' '--- .cargo/config.toml ---'
if [ -f .cargo/config.toml ]; then
cat -n .cargo/config.toml
else
printf '%s\n' '.cargo/config.toml not found'
fi
printf '%s\n' '--- relevant configuration entries ---'
rg -n -C 3 '^\[(build|target)|rustflags|linker' .cargo/config.toml tools/dev-fast/config.toml 2>/dev/null || trueRepository: leynos/statelet Length of output: 3761 🌐 Web query:
💡 Result: In Cargo's configuration system, Citations:
🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- Cargo availability ---'
if command -v cargo >/dev/null 2>&1; then
cargo --version
printf '%s\n' '--- cargo help config ---'
cargo help config 2>/dev/null | sed -n '1,220p' || true
else
printf '%s\n' 'cargo is not available'
fi
printf '%s\n' '--- repository references to dev-fast and rustflags ---'
rg -n -C 3 'dev-fast|cargo --config|rustflags|target\.cfg|target\.x86_64-unknown-linux-gnu' Makefile* tools .cargo .github 2>/dev/null || trueRepository: leynos/statelet Length of output: 3498 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- cargo config get help ---'
cargo config get --help | sed -n '1,220p'
printf '%s\n' '--- merged target configuration ---'
cargo --offline --config tools/dev-fast/config.toml config get target 2>&1 || true
printf '%s\n' '--- merged rustflags configuration ---'
cargo --offline --config tools/dev-fast/config.toml config get target.x86_64-unknown-linux-gnu.rustflags 2>&1 || true
cargo --offline --config tools/dev-fast/config.toml config get 'target.cfg(target_os = "linux").rustflags' 2>&1 || true
cargo --offline --config tools/dev-fast/config.toml config get build.rustflags 2>&1 || trueRepository: leynos/statelet Length of output: 2170 Correct the Cargo joins matching target-triple and target-CFG 🤖 Prompt for AI Agents |
||
|
|
||
| [unstable] | ||
| codegen-backend = true | ||
|
|
||
| # Cranelift trades runtime performance for compile speed, so it applies to | ||
| # the dev profile only. The `make dev-*` targets never build release | ||
| # artefacts. | ||
| [profile.dev] | ||
| codegen-backend = "cranelift" | ||
|
|
||
| # mold ships for Linux only, so the flag is gated behind a target `cfg`. On | ||
| # macOS and Windows the table simply does not apply and the platform default | ||
| # linker is used. | ||
| [target.'cfg(target_os = "linux")'] | ||
| rustflags = ["-Clink-arg=-fuse-ld=mold"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,9 @@ stems = [] | |
| accepted = [] | ||
|
|
||
| [words.corrections] | ||
| # "mold" names the linker (https://github.com/rui314/mold); it is not a | ||
| # misspelling of "mould" in that context. | ||
| mold = "mold" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- typos.local.toml ---'
cat -n typos.local.toml
printf '%s\n' '--- generated typos.toml references ---'
rg -n -C 4 'mold|extend-words|corrections|words' typos.toml .github scripts Makefile README.md docs 2>/dev/null || true
printf '%s\n' '--- repository config and generation references ---'
rg -n -C 3 'typos\.local\.toml|typos\.toml|typos' --glob '!target/**' --glob '!*.lock' .Repository: leynos/statelet Length of output: 36358 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- all tracked mold occurrences ---'
git grep -n -i -w 'mold' -- ':!typos.toml' ':!typos.local.toml' || true
printf '%s\n' '--- generated configuration sections ---'
sed -n '1,70p' typos.toml
printf '%s\n' '--- spelling policy documentation ---'
sed -n '62,105p' docs/developers-guide.md
sed -n '357,375p' AGENTS.md
printf '%s\n' '--- builder pin and local policy tests ---'
sed -n '20,35p' Makefile
sed -n '1,130p' scripts/tests/test_typos_rollout_check.pyRepository: leynos/statelet Length of output: 11325 🌐 Web query:
💡 Result: The official configuration reference for the typos crate is maintained in the project's repository [1][2]. Configuration Details - Word Corrections: Defined under [default.extend-words] as a table mapping typo keys to their corrections. Setting a key to itself (e.g., mold = "mold") marks it as valid and prevents it from being corrected [1][3]. - File/Type-specific Configuration: Handled via the [type.NAME] table. You can specify glob patterns with extend-glob, and override behaviors like check-file (to check filenames but ignore content) or other default settings [1][4][5]. - Regex Pattern Ignores: Supported through fields like extend-ignore-re (for custom patterns) and extend-ignore-words-re (for ignoring specific words) [1][3]. You can also use extend-exclude in the [files] section to ignore entire file paths [1][6]. Self-Correction Scope A configuration entry like mold = "mold" in [default.extend-words] is global in scope [1]. It instructs the spell checker to treat the word as always valid throughout the entire project [1]. Narrow Alternatives If you need to avoid correcting a word only in specific contexts or files rather than globally, consider the following alternatives: - File-Type Scope: Use [type.NAME] configuration blocks to apply settings only to specific file types [1][4]. - Exclusions: Move problematic files or directories into [files] extend-exclude to stop checking them entirely [1][6]. - Inline Ignores: While not a direct config setting, you can use regex-based ignores (configured in [default] extend-ignore-re) to look for specific patterns or markers (e.g., spellchecker:disable-line) within your source code to skip checking for that specific line or block [7]. You can verify your effective configuration at any time by running typos --dump-config - [1][2][4]. Citations:
🏁 Script executed (no clone): Length of output: 245 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import tomllib
local = tomllib.loads(Path("typos.local.toml").read_text())
generated = tomllib.loads(Path("typos.toml").read_text())
mapping = local["words"]["corrections"]
global_words = generated["default"]["extend-words"]
print("local words.corrections:", mapping)
print("generated default.extend-words mold:", global_words.get("mold"))
print("generated global self-acceptance:", global_words.get("mold") == "mold")
PYRepository: leynos/statelet Length of output: 273 🏁 Script executed (no clone): Length of output: 1255 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re
local = Path("typos.local.toml").read_text()
generated = Path("typos.toml").read_text()
local_match = re.search(r'(?m)^mold\s*=\s*"mold"\s*$', local)
generated_match = re.search(
r'(?ms)^\[default\.extend-words\]\s*(.*?)(?=^\[|\Z)', generated
)
global_match = generated_match and re.search(
r'(?m)^"mold"\s*=\s*"mold"\s*$', generated_match.group(1)
)
print("local self-correction:", bool(local_match))
print("generated default.extend-words contains mold self-correction:", bool(global_match))
if not (local_match and global_match):
raise SystemExit("expected mapping was not found in both configurations")
PYRepository: leynos/statelet Length of output: 248 🏁 Script executed (no clone): Length of output: 1972 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- local pattern overlay examples ---'
git grep -n -E '^\[patterns|^ignore\s*=\s*\[|extend-ignore-re|extend-words|words\.corrections' -- \
'*.toml' '*.md' '*.py' ':!typos.toml' || true
printf '%s\n' '--- all mold contexts ---'
git grep -n -i -w 'mold' -- \
':!typos.toml' ':!typos.local.toml' \
| sed -n '1,120p'Repository: leynos/statelet Length of output: 2600 🏁 Script executed (no clone): Length of output: 3396 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re
text = Path("typos.local.toml").read_text()
patterns = re.findall(r'(?m)^\s*"([^"]+)"\s*,?\s*$', text)
print("local pattern count:", len(patterns))
print("local pattern entries:")
for pattern in patterns:
print(pattern)
if not any("Architecture" in p for p in patterns):
raise SystemExit("expected context-specific pattern missing")
PYRepository: leynos/statelet Length of output: 285 Scope the Use 🤖 Prompt for AI AgentsSource: Learnings |
||
|
|
||
| [patterns] | ||
| # Preserve complete formal names while allowing Markdown line wrapping. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Describe this file as the source fragment.
This file already lives at
tools/dev-fast/config.toml. The instruction to copy the fragment to the same path is self-contradictory. Replace it with a direct instruction to pass this file with--config.Proposed wording fix
🤖 Prompt for AI Agents