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:
andrea.difonzo
2026-11-11 11:06:46 +01:00
parent df99318392
commit 86e7c72e5f
10383 changed files with 749164 additions and 749170 deletions

View File

@@ -237,7 +237,7 @@ def codex_rust_crate(
name: Bazel target name for the library, should be the directory name.
Example: `app-server`.
crate_name: Cargo crate name from Cargo.toml
Example: `codex_app_server`.
Example: `akode_app_server`.
crate_features: Cargo features to enable for this crate.
Crates are only compiled in a single configuration across the workspace, i.e.
with all features in this list enabled. So use sparingly, and prefer to refactor
@@ -297,7 +297,7 @@ def codex_rust_crate(
test_env = {
# The launcher resolves an absolute workspace root at runtime so
# manifest-only platforms like macOS still point Insta at the real
# `codex-rs` checkout.
# `akode-rs` checkout.
"INSTA_WORKSPACE_ROOT": ".",
"INSTA_SNAPSHOT_PATH": "src",
}
@@ -323,8 +323,8 @@ def codex_rust_crate(
} | rustc_env
manifest_relpath = native.package_name()
if manifest_relpath.startswith("codex-rs/"):
manifest_relpath = manifest_relpath[len("codex-rs/"):]
if manifest_relpath.startswith("akode-rs/"):
manifest_relpath = manifest_relpath[len("akode-rs/"):]
manifest_path = manifest_relpath + "/Cargo.toml"
crate_version = package_data["version"]
@@ -381,13 +381,13 @@ def codex_rust_crate(
# Unit tests also compile to standalone Windows executables, so
# keep their stack reserve aligned with binaries and integration
# tests under gnullvm.
# Bazel has emitted both `codex-rs/<crate>/...` and
# `../codex-rs/<crate>/...` paths for `file!()`. Strip either
# Bazel has emitted both `akode-rs/<crate>/...` and
# `../akode-rs/<crate>/...` paths for `file!()`. Strip either
# prefix so the workspace-root launcher sees Cargo-like metadata
# such as `tui/src/...`.
rustc_flags = rustc_flags_extra + WINDOWS_RUSTC_LINK_FLAGS + [
"--remap-path-prefix=../codex-rs=",
"--remap-path-prefix=codex-rs=",
"--remap-path-prefix=../akode-rs=",
"--remap-path-prefix=akode-rs=",
],
rustc_env = rustc_env,
data = test_data_extra + [binary for binary in extra_binaries if binary not in test_data_extra],
@@ -412,7 +412,7 @@ def codex_rust_crate(
for binary in extra_binaries
},
test_bin = ":" + unit_test_binary,
workspace_root_marker = "//codex-rs/utils/cargo-bin:repo_root.marker",
workspace_root_marker = "//akode-rs/utils/cargo-bin:repo_root.marker",
tags = test_tags,
**unit_test_kwargs
)
@@ -472,8 +472,8 @@ def codex_rust_crate(
compile_data = unit_test_srcs,
deps = all_crate_deps(normal_dev = True),
rustc_flags = rustc_flags_extra + WINDOWS_RUSTC_LINK_FLAGS + [
"--remap-path-prefix=../codex-rs=",
"--remap-path-prefix=codex-rs=",
"--remap-path-prefix=../akode-rs=",
"--remap-path-prefix=akode-rs=",
],
rustc_env = rustc_env,
data = test_data_extra,
@@ -495,7 +495,7 @@ def codex_rust_crate(
env = test_env,
windows_runtime = binary_unit_test_windows_runtime,
test_bin = ":" + binary_unit_test_binary,
workspace_root_marker = "//codex-rs/utils/cargo-bin:repo_root.marker",
workspace_root_marker = "//akode-rs/utils/cargo-bin:repo_root.marker",
target_compatible_with = binary_test_target_compatible_with,
tags = test_tags,
**binary_unit_test_kwargs
@@ -605,12 +605,12 @@ def codex_rust_crate(
data = integration_test_files + integration_test_binaries + integration_test_data_extra,
compile_data = integration_compile_files + integration_compile_data_extra,
deps = all_crate_deps(normal = True, normal_dev = True) + maybe_deps + deps_extra,
# Bazel has emitted both `codex-rs/<crate>/...` and
# `../codex-rs/<crate>/...` paths for `file!()`. Strip either
# Bazel has emitted both `akode-rs/<crate>/...` and
# `../akode-rs/<crate>/...` paths for `file!()`. Strip either
# prefix so Insta records Cargo-like metadata such as `core/tests/...`.
rustc_flags = rustc_flags_extra + WINDOWS_RUSTC_LINK_FLAGS + [
"--remap-path-prefix=../codex-rs=",
"--remap-path-prefix=codex-rs=",
"--remap-path-prefix=../akode-rs=",
"--remap-path-prefix=akode-rs=",
],
rustc_env = rustc_env,
target_compatible_with = WINDOWS_GNULLVM_INCOMPATIBLE,
@@ -628,7 +628,7 @@ def codex_rust_crate(
runfile_env = integration_test_cargo_env_runfiles,
test_bin = ":" + integration_test_binary,
test_threads = test_threads,
workspace_root_marker = "//codex-rs/utils/cargo-bin:repo_root.marker",
workspace_root_marker = "//akode-rs/utils/cargo-bin:repo_root.marker",
target_compatible_with = WINDOWS_GNULLVM_INCOMPATIBLE,
tags = test_tags,
**test_kwargs
@@ -646,12 +646,12 @@ def codex_rust_crate(
data = integration_test_files + integration_test_binaries + integration_test_data_extra,
compile_data = integration_compile_files + integration_compile_data_extra,
deps = all_crate_deps(normal = True, normal_dev = True) + maybe_deps + deps_extra,
# Bazel has emitted both `codex-rs/<crate>/...` and
# `../codex-rs/<crate>/...` paths for `file!()`. Strip either
# Bazel has emitted both `akode-rs/<crate>/...` and
# `../akode-rs/<crate>/...` paths for `file!()`. Strip either
# prefix so Insta records Cargo-like metadata such as `core/tests/...`.
rustc_flags = rustc_flags_extra + WINDOWS_RUSTC_LINK_FLAGS + [
"--remap-path-prefix=../codex-rs=",
"--remap-path-prefix=codex-rs=",
"--remap-path-prefix=../akode-rs=",
"--remap-path-prefix=akode-rs=",
],
rustc_env = rustc_env,
env = integration_test_cargo_env,
@@ -669,7 +669,7 @@ def codex_rust_crate(
wine_exec_server = wine_test_name + "-windows-exec-server"
foreign_platform_binary(
name = wine_exec_server,
binary = "//codex-rs/exec-server/testing:exec-server",
binary = "//akode-rs/exec-server/testing:exec-server",
extra_rustc_flags = WINDOWS_GNULLVM_RUSTC_LINK_FLAGS,
platform = "//:windows_x86_64_gnullvm",
tags = ["manual"],
@@ -683,7 +683,7 @@ def codex_rust_crate(
wine_test_binaries["wine-windows-exec-server"] = ":" + wine_exec_server
wine_runtime = wine_test_runtime(wine_test_binaries)
wine_runfile_env = dict(wine_runtime.runfile_env)
wine_runfile_env[native_test_binary] = "CODEX_WINE_EXEC_TEST_BINARY"
wine_runfile_env[native_test_binary] = "AKODE_WINE_EXEC_TEST_BINARY"
wine_test_kwargs = {}
wine_test_kwargs.update(integration_test_kwargs)
@@ -699,8 +699,8 @@ def codex_rust_crate(
data = wine_runtime.data,
env = test_env,
runfile_env = wine_runfile_env,
test_bin = "//codex-rs/exec-server/testing:wine-exec-test-runner",
workspace_root_marker = "//codex-rs/utils/cargo-bin:repo_root.marker",
test_bin = "//akode-rs/exec-server/testing:wine-exec-test-runner",
workspace_root_marker = "//akode-rs/utils/cargo-bin:repo_root.marker",
target_compatible_with = WINE_TEST_TARGET_COMPATIBLE_WITH,
# This wrapper has no Rust sources and transitions a data
# dependency to a Windows toolchain the lint does not register.
@@ -723,8 +723,8 @@ def codex_rust_crate(
compile_data = integration_compile_files + integration_compile_data_extra,
deps = all_crate_deps(normal = True, normal_dev = True) + maybe_deps + deps_extra,
rustc_flags = rustc_flags_extra + WINDOWS_RUSTC_LINK_FLAGS + [
"--remap-path-prefix=../codex-rs=",
"--remap-path-prefix=codex-rs=",
"--remap-path-prefix=../akode-rs=",
"--remap-path-prefix=akode-rs=",
],
rustc_env = rustc_env,
env = integration_test_cargo_env,
@@ -739,7 +739,7 @@ def codex_rust_crate(
env = integration_test_cargo_env,
runfile_env = integration_test_cargo_env_runfiles,
test_bin = ":" + windows_cross_test_binary,
workspace_root_marker = "//codex-rs/utils/cargo-bin:repo_root.marker",
workspace_root_marker = "//akode-rs/utils/cargo-bin:repo_root.marker",
target_compatible_with = WINDOWS_GNULLVM_ONLY,
tags = test_tags,
**windows_cross_test_kwargs