mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
hanzo-search is Dev's one search path. It answers text (regex), file names (glob) and symbols (word-boundary identifiers, definitions first, with a Resolver hook for semantic confirmation) over tgrep-core's trigram index, linked in process and pinned by commit. Per path it asks a running tgrep server, else the on-disk index, else scans with tgrep's walker. Paths Dev names, and files changed after a tool that may write began, are read from disk instead of a lagging index. hanzo-grep gives the agent the engine as one native tool, grep, installed in the app server's extensions by an anchored edit. It marks every other tool start so the next search sees what the tool wrote. The base instructions send the model to grep, and to rg only on error. tgrep-core's rusqlite git pin would link a second SQLite beside sqlx's; the root manifest patches it to rusqlite 0.39, which shares 0.37.
69 lines
2.2 KiB
Makefile
69 lines
2.2 KiB
Makefile
CARGO_HOME ?= $(HOME)/.cargo
|
|
export PATH := $(CARGO_HOME)/bin:$(PATH)
|
|
export NEXTEST_HIDE_PROGRESS_BAR := true
|
|
|
|
TOOL := cargo run --quiet --manifest-path crates/hanzo-upstream/Cargo.toml --
|
|
CARGO := RUST_MIN_STACK=8388608 cargo
|
|
|
|
.PHONY: all prepare build release install test test-upstream bump v8 fmt clean reset help
|
|
.DEFAULT_GOAL := build
|
|
|
|
all: build
|
|
|
|
## prepare: apply the owned edits to the pinned upstream checkout
|
|
prepare:
|
|
@$(TOOL) prepare
|
|
|
|
## build: build the dev binary
|
|
build: prepare
|
|
@$(CARGO) build --locked -p hanzo-dev --bin dev
|
|
|
|
## release: build the optimized dev binary
|
|
release: prepare
|
|
@$(CARGO) build --locked --release -p hanzo-dev --bin dev
|
|
|
|
## install: put the release binary on PATH
|
|
install: release
|
|
@$(CARGO) install --locked --path crates/hanzo-dev --bin dev
|
|
|
|
## test: run the Hanzo test suite
|
|
# hanzo-upstream is a detached workspace, so the root run cannot see it — and it
|
|
# is the code that edits upstream in place, which is the last thing to leave
|
|
# untested.
|
|
test: prepare
|
|
@$(CARGO) nextest run --locked --no-fail-fast $(ARGS)
|
|
@$(CARGO) nextest run --no-fail-fast --manifest-path crates/hanzo-upstream/Cargo.toml $(ARGS)
|
|
|
|
## test-upstream: run the upstream suite against the pinned submodule
|
|
# voice-host wants GStreamer >= 1.28, which no current distribution ships, and
|
|
# nothing else in the workspace depends on it.
|
|
test-upstream: v8
|
|
@. target/v8-env.sh && $(CARGO) nextest run --no-fail-fast \
|
|
--manifest-path upstream/codex/codex-rs/Cargo.toml \
|
|
--workspace --exclude codex-voice-host $(ARGS)
|
|
|
|
## bump: move the upstream submodules to newer revisions
|
|
bump:
|
|
@$(TOOL) bump $(ARGS)
|
|
@$(TOOL) prepare
|
|
|
|
## v8: download and verify the V8 build the JavaScript runtime links
|
|
v8:
|
|
@$(TOOL) v8
|
|
|
|
## fmt: format the crates Hanzo owns
|
|
fmt:
|
|
@$(CARGO) fmt -p hanzo-dev -p hanzo-config -p hanzo-tui -p hanzo-kai -p hanzo-loop -p hanzo-version -p hanzo-search -p hanzo-grep
|
|
@$(CARGO) fmt --manifest-path crates/hanzo-upstream/Cargo.toml
|
|
|
|
## clean: discard build output
|
|
clean:
|
|
@$(CARGO) clean
|
|
|
|
## reset: return the upstream checkout to its pinned revision
|
|
reset:
|
|
@git submodule foreach --quiet 'git reset --quiet --hard'
|
|
|
|
help:
|
|
@grep -hE '^## ' $(MAKEFILE_LIST) | sed 's/## / make /' | sort
|