aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -91,7 +91,7 @@ rustup toolchain install nightly-2026-08-20 \
|
||||
|
||||
The checked-in DotSlash file lives at `tools/argument-comment-lint/argument-comment-lint`.
|
||||
`run-prebuilt-linter.py` resolves that file via `dotslash` and is the path used by
|
||||
targeted package runs such as `just argument-comment-lint -p codex-core`.
|
||||
targeted package runs such as `just argument-comment-lint -p akode-core`.
|
||||
Repo-wide runs now go through a native Bazel aspect that invokes a custom
|
||||
`rustc_driver` and reuses Bazel-managed Rust dependency metadata instead of
|
||||
spawning `cargo dylint` once per crate. The source-build path remains available
|
||||
@@ -128,21 +128,21 @@ required for the current Windows Dylint driver path.
|
||||
If you are changing the lint crate itself, use the source-build wrapper:
|
||||
|
||||
```bash
|
||||
./tools/argument-comment-lint/run.py -p codex-core
|
||||
./tools/argument-comment-lint/run.py -p akode-core
|
||||
```
|
||||
|
||||
Run the lint against `codex-rs` from the repo root:
|
||||
Run the lint against `akode-rs` from the repo root:
|
||||
|
||||
```bash
|
||||
just argument-comment-lint
|
||||
bazel build --config=argument-comment-lint -- \
|
||||
$(./tools/argument-comment-lint/list-bazel-targets.sh)
|
||||
./tools/argument-comment-lint/run-prebuilt-linter.py -p codex-core
|
||||
just argument-comment-lint -p codex-core
|
||||
./tools/argument-comment-lint/run-prebuilt-linter.py -p akode-core
|
||||
just argument-comment-lint -p akode-core
|
||||
```
|
||||
|
||||
If no package selection is provided, `just argument-comment-lint` now defaults
|
||||
to the Bazel aspect path over `//codex-rs/...`. The Python wrappers remain the
|
||||
to the Bazel aspect path over `//akode-rs/...`. The Python wrappers remain the
|
||||
package-scoped escape hatch and still default the underlying Cargo invocation
|
||||
to `--all-targets` unless you explicitly narrow the target set, so targeted
|
||||
wrapper runs cover test-only call sites by default. The Bazel entrypoints use
|
||||
@@ -154,7 +154,7 @@ Repo runs also promote `argument_comment_mismatch` and
|
||||
`uncommented_anonymous_literal_argument` to errors by default:
|
||||
|
||||
```bash
|
||||
./tools/argument-comment-lint/run-prebuilt-linter.py -p codex-core
|
||||
./tools/argument-comment-lint/run-prebuilt-linter.py -p akode-core
|
||||
```
|
||||
|
||||
The wrapper does that by setting `DYLINT_RUSTFLAGS`, and it leaves an explicit
|
||||
@@ -166,11 +166,11 @@ hoc run:
|
||||
```bash
|
||||
DYLINT_RUSTFLAGS="-A argument-comment-mismatch -A uncommented-anonymous-literal-argument" \
|
||||
CARGO_INCREMENTAL=1 \
|
||||
./tools/argument-comment-lint/run.py -p codex-core
|
||||
./tools/argument-comment-lint/run.py -p akode-core
|
||||
```
|
||||
|
||||
To override an explicitly narrow target selection, or to be explicit in scripts:
|
||||
|
||||
```bash
|
||||
./tools/argument-comment-lint/run-prebuilt-linter.py -p codex-core -- --all-targets
|
||||
./tools/argument-comment-lint/run-prebuilt-linter.py -p akode-core -- --all-targets
|
||||
```
|
||||
|
||||
@@ -182,7 +182,7 @@ Runs argument-comment-lint on Rust targets using Bazel's Rust dependency graph.
|
||||
Example:
|
||||
|
||||
```output
|
||||
$ bazel build --config=argument-comment-lint //codex-rs/...
|
||||
$ bazel build --config=argument-comment-lint //akode-rs/...
|
||||
```
|
||||
""",
|
||||
)
|
||||
|
||||
@@ -12,7 +12,7 @@ cd "${repo_root}"
|
||||
manual_rust_test_targets="$(
|
||||
./.github/scripts/run-bazel-query-ci.sh \
|
||||
--output=label \
|
||||
-- 'kind("rust_test rule", attr(tags, "manual", //codex-rs/...))'
|
||||
-- 'kind("rust_test rule", attr(tags, "manual", //akode-rs/...))'
|
||||
)"
|
||||
if [[ "${RUNNER_OS:-}" != "Windows" ]]; then
|
||||
manual_rust_test_targets="$(printf '%s\n' "${manual_rust_test_targets}" | grep -v -- '-windows-cross-bin$' || true)"
|
||||
@@ -23,13 +23,13 @@ fi
|
||||
excluded_targets="$(
|
||||
./.github/scripts/run-bazel-query-ci.sh \
|
||||
--output=label \
|
||||
-- 'attr(tags, "no-argument-comment-lint", //codex-rs/...)'
|
||||
-- 'attr(tags, "no-argument-comment-lint", //akode-rs/...)'
|
||||
)"
|
||||
|
||||
# The lint configuration does not register the transitioned Windows toolchain.
|
||||
printf '%s\n' \
|
||||
"//codex-rs/..." \
|
||||
"-//codex-rs/core/tests/remote_env_windows:smoke-test"
|
||||
"//akode-rs/..." \
|
||||
"-//akode-rs/core/tests/remote_env_windows:smoke-test"
|
||||
if [[ -n "${excluded_targets}" ]]; then
|
||||
printf '%s\n' "${excluded_targets}" | sed 's/^/-/'
|
||||
fi
|
||||
|
||||
@@ -24,7 +24,7 @@ from wrapper_common import (
|
||||
def main() -> "Never":
|
||||
root = repo_root()
|
||||
parsed = parse_wrapper_args(sys.argv[1:])
|
||||
final_args = build_final_args(parsed, root / "codex-rs" / "Cargo.toml")
|
||||
final_args = build_final_args(parsed, root / "akode-rs" / "Cargo.toml")
|
||||
|
||||
env = os.environ.copy()
|
||||
prefer_rustup_shims(env)
|
||||
|
||||
@@ -21,7 +21,7 @@ from wrapper_common import (
|
||||
def main() -> "Never":
|
||||
root = repo_root()
|
||||
parsed = parse_wrapper_args(sys.argv[1:])
|
||||
final_args = build_final_args(parsed, root / "codex-rs" / "Cargo.toml")
|
||||
final_args = build_final_args(parsed, root / "akode-rs" / "Cargo.toml")
|
||||
|
||||
env = os.environ.copy()
|
||||
ensure_source_prerequisites(env)
|
||||
|
||||
@@ -290,8 +290,8 @@ fn ui() {
|
||||
|
||||
#[test]
|
||||
fn workspace_crate_filter_accepts_first_party_names_only() {
|
||||
assert!(is_workspace_crate_name("codex_core"));
|
||||
assert!(is_workspace_crate_name("codex_tui"));
|
||||
assert!(is_workspace_crate_name("akode_core"));
|
||||
assert!(is_workspace_crate_name("akode_tui"));
|
||||
assert!(is_workspace_crate_name("core_test_support"));
|
||||
assert!(!is_workspace_crate_name("std"));
|
||||
assert!(!is_workspace_crate_name("tokio"));
|
||||
|
||||
@@ -15,14 +15,14 @@ class WrapperCommonTest(unittest.TestCase):
|
||||
def test_defaults_to_workspace_and_all_targets(self) -> None:
|
||||
parsed = wrapper_common.parse_wrapper_args([])
|
||||
final_args = wrapper_common.build_final_args(
|
||||
parsed, Path("/repo/codex-rs/Cargo.toml")
|
||||
parsed, Path("/repo/akode-rs/Cargo.toml")
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
final_args,
|
||||
[
|
||||
"--manifest-path",
|
||||
"/repo/codex-rs/Cargo.toml",
|
||||
"/repo/akode-rs/Cargo.toml",
|
||||
"--workspace",
|
||||
"--no-deps",
|
||||
"--",
|
||||
@@ -32,40 +32,40 @@ class WrapperCommonTest(unittest.TestCase):
|
||||
|
||||
def test_forwarded_cargo_args_keep_single_separator(self) -> None:
|
||||
parsed = wrapper_common.parse_wrapper_args(
|
||||
["-p", "codex-core", "--", "--tests"]
|
||||
["-p", "akode-core", "--", "--tests"]
|
||||
)
|
||||
final_args = wrapper_common.build_final_args(
|
||||
parsed, Path("/repo/codex-rs/Cargo.toml")
|
||||
parsed, Path("/repo/akode-rs/Cargo.toml")
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
final_args,
|
||||
[
|
||||
"--manifest-path",
|
||||
"/repo/codex-rs/Cargo.toml",
|
||||
"/repo/akode-rs/Cargo.toml",
|
||||
"--no-deps",
|
||||
"-p",
|
||||
"codex-core",
|
||||
"akode-core",
|
||||
"--",
|
||||
"--tests",
|
||||
],
|
||||
)
|
||||
|
||||
def test_fix_does_not_add_all_targets(self) -> None:
|
||||
parsed = wrapper_common.parse_wrapper_args(["--fix", "-p", "codex-core"])
|
||||
parsed = wrapper_common.parse_wrapper_args(["--fix", "-p", "akode-core"])
|
||||
final_args = wrapper_common.build_final_args(
|
||||
parsed, Path("/repo/codex-rs/Cargo.toml")
|
||||
parsed, Path("/repo/akode-rs/Cargo.toml")
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
final_args,
|
||||
[
|
||||
"--manifest-path",
|
||||
"/repo/codex-rs/Cargo.toml",
|
||||
"/repo/akode-rs/Cargo.toml",
|
||||
"--no-deps",
|
||||
"--fix",
|
||||
"-p",
|
||||
"codex-core",
|
||||
"akode-core",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -81,7 +81,7 @@ class WrapperCommonTest(unittest.TestCase):
|
||||
]
|
||||
)
|
||||
final_args = wrapper_common.build_final_args(
|
||||
parsed, Path("/repo/codex-rs/Cargo.toml")
|
||||
parsed, Path("/repo/akode-rs/Cargo.toml")
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
@@ -104,7 +104,7 @@ class WrapperCommonTest(unittest.TestCase):
|
||||
]
|
||||
)
|
||||
final_args = wrapper_common.build_final_args(
|
||||
parsed, Path("/repo/codex-rs/Cargo.toml")
|
||||
parsed, Path("/repo/akode-rs/Cargo.toml")
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
|
||||
@@ -212,7 +212,7 @@ def ensure_source_prerequisites(env: MutableMapping[str, str]) -> None:
|
||||
|
||||
|
||||
def prefer_rustup_shims(env: MutableMapping[str, str]) -> None:
|
||||
if env.get("CODEX_ARGUMENT_COMMENT_LINT_SKIP_RUSTUP_SHIMS") == "1":
|
||||
if env.get("AKODE_ARGUMENT_COMMENT_LINT_SKIP_RUSTUP_SHIMS") == "1":
|
||||
return
|
||||
|
||||
rustup = shutil.which("rustup", path=env.get("PATH"))
|
||||
|
||||
Reference in New Issue
Block a user