postjevsql.git / tools / CLAUDE.md
1@README.md
2
3- **The Cargo manifests are generated.** Never edit a `Cargo.toml` outside
4  `third-party/` by hand: change the BUCK file (or `build/defs.bzl`,
5  `third-party/Cargo.toml`) and run `mise run generated:update`.
6- **A new first-party buck package must be added to `PACKAGES` in
7  `tools/cargo-gen/BUCK`,** or it gets no manifest. Buck cannot enumerate
8  packages from inside a build, so that list is the one hand-kept input.
9- **`third-party/BUCK` exports `Cargo.toml` through `buckfile_imports` in
10  `third-party/reindeer.toml`;** setting that key drops reindeer's default
11  `cargo.` rule prefixes, which is why the same file sets them back.
12- **Never fix a drift failure by editing the committed file.** Run the
13  tool's `:update`; a hand edit that happens to match will drift again on
14  the next change.
15- **A script here reads the environment and never assumes mise or nix.**
16  `configure.sh` takes each major's install prefix from `POSTJEVSQL_PG_<major>`
17  and the compiler from `PATH` or `CLANG`; `mise run configure` supplies them.
18  A version a script must repeat goes in `mise.toml` and `check-versions.sh`.