mirror of
https://github.com/openai/codex.git
synced 2026-03-05 13:35:28 +03:00
## Why Developers are frequently running low on disk space, and routine use of `--all-features` contributes to larger Cargo build caches in `target/` by compiling additional feature combinations. This change updates local workflow guidance to avoid `--all-features` by default and reserve it for cases where full feature coverage is specifically needed. ## What Changed - Updated `AGENTS.md` guidance for `codex-rs` to recommend `cargo test` / `just test` for full-suite local runs, and to call out the disk-usage cost of routine `--all-features` usage. - Updated the root `justfile` so `just fix` and `just clippy` no longer pass `--all-features` by default. - Updated `docs/install.md` to explicitly describe `cargo test --all-features` as an optional heavier-weight run (more build time and `target/` disk usage). ## Verification - Confirmed the `justfile` parses and the recipes list successfully with `just --list`.
88 lines
2.3 KiB
Makefile
88 lines
2.3 KiB
Makefile
set working-directory := "codex-rs"
|
|
set positional-arguments
|
|
|
|
# Display help
|
|
help:
|
|
just -l
|
|
|
|
# `codex`
|
|
alias c := codex
|
|
codex *args:
|
|
cargo run --bin codex -- "$@"
|
|
|
|
# `codex exec`
|
|
exec *args:
|
|
cargo run --bin codex -- exec "$@"
|
|
|
|
# Run the CLI version of the file-search crate.
|
|
file-search *args:
|
|
cargo run --bin codex-file-search -- "$@"
|
|
|
|
# Build the CLI and run the app-server test client
|
|
app-server-test-client *args:
|
|
cargo build -p codex-cli
|
|
cargo run -p codex-app-server-test-client -- --codex-bin ./target/debug/codex "$@"
|
|
|
|
# format code
|
|
fmt:
|
|
cargo fmt -- --config imports_granularity=Item 2>/dev/null
|
|
|
|
fix *args:
|
|
cargo clippy --fix --tests --allow-dirty "$@"
|
|
|
|
clippy:
|
|
cargo clippy --tests "$@"
|
|
|
|
install:
|
|
rustup show active-toolchain
|
|
cargo fetch
|
|
|
|
# Run `cargo nextest` since it's faster than `cargo test`, though including
|
|
# --no-fail-fast is important to ensure all tests are run.
|
|
#
|
|
# Run `cargo install cargo-nextest` if you don't have it installed.
|
|
# Prefer this for routine local runs; use explicit `cargo test --all-features`
|
|
# only when you specifically need full feature coverage.
|
|
test:
|
|
cargo nextest run --no-fail-fast
|
|
|
|
# Build and run Codex from source using Bazel.
|
|
# Note we have to use the combination of `[no-cd]` and `--run_under="cd $PWD &&"`
|
|
# to ensure that Bazel runs the command in the current working directory.
|
|
[no-cd]
|
|
bazel-codex *args:
|
|
bazel run //codex-rs/cli:codex --run_under="cd $PWD &&" -- "$@"
|
|
|
|
[no-cd]
|
|
bazel-lock-update:
|
|
bazel mod deps --lockfile_mode=update
|
|
|
|
[no-cd]
|
|
bazel-lock-check:
|
|
./scripts/check-module-bazel-lock.sh
|
|
|
|
bazel-test:
|
|
bazel test //... --keep_going
|
|
|
|
bazel-remote-test:
|
|
bazel test //... --config=remote --platforms=//:rbe --keep_going
|
|
|
|
build-for-release:
|
|
bazel build //codex-rs/cli:release_binaries --config=remote
|
|
|
|
# Run the MCP server
|
|
mcp-server-run *args:
|
|
cargo run -p codex-mcp-server -- "$@"
|
|
|
|
# Regenerate the json schema for config.toml from the current config types.
|
|
write-config-schema:
|
|
cargo run -p codex-core --bin codex-write-config-schema
|
|
|
|
# Regenerate vendored app-server protocol schema artifacts.
|
|
write-app-server-schema *args:
|
|
cargo run -p codex-app-server-protocol --bin write_schema_fixtures -- "$@"
|
|
|
|
# Tail logs from the state SQLite database
|
|
log *args:
|
|
if [ "${1:-}" = "--" ]; then shift; fi; cargo run -p codex-state --bin logs_client -- "$@"
|