diff --git a/AGENTS.template.md b/AGENTS.template.md index cc076dc..8de5ac4 100644 --- a/AGENTS.template.md +++ b/AGENTS.template.md @@ -36,9 +36,9 @@ Tests run inside the Flatpak sandbox, where: Every `flatpak run` is its own sandbox with its own pid namespace. -**Crafter.Network** comes from forgejo, unpinned, so every load `git pull`s it. `--local` takes `../Crafter.Network`, and `CRAFTER_DEBUG_NETWORK=` takes any checkout, a worktree say. The environment reaches the build inside the Flatpak. +**Crafter.Network** comes from forgejo, unpinned, so every load `git pull`s it. `--local` takes `../Crafter.Network` instead. -The transport needs Network's callback API (`OnRecieve`, `SendAsync`, `OnClosed`, `ListenerQUIC` with a bind address and `Port()`) and its fix that lets stopped streams finish before `~ClientQUIC` closes. Until those reach Network's `master`, build with `CRAFTER_DEBUG_NETWORK` pointing at a checkout of the branch that has them. +The transport needs Network's callback API (`OnRecieve`, `SendAsync`, `OnClosed`, `ListenerQUIC` with a bind address and `Port()`) and its fix that lets stopped streams finish before `~ClientQUIC` closes. Both are on Network's `master` from 79a2f12 on, so a `../Crafter.Network` older than that does not build the transport. ## Build and test commands @@ -46,7 +46,7 @@ The transport needs Network's callback API (`OnRecieve`, `SendAsync`, `OnClosed` flatpak run --die-with-parent net.catcrafts.CrafterBuild # the library, core, client flatpak run --die-with-parent net.catcrafts.CrafterBuild test # every test flatpak run --die-with-parent net.catcrafts.CrafterBuild test 'Should*Client*' -CRAFTER_DEBUG_NETWORK=../Crafter.Network-quic-callbacks/project.cpp flatpak run --die-with-parent net.catcrafts.CrafterBuild test # Network from a worktree +flatpak run --die-with-parent net.catcrafts.CrafterBuild test --local # with ../Crafter.Network cd examples/Basic && flatpak run --die-with-parent net.catcrafts.CrafterBuild --debug-api # a consumer's debug build ``` diff --git a/README.md b/README.md index 817e5b5..5481d6b 100644 --- a/README.md +++ b/README.md @@ -324,7 +324,7 @@ cd examples/Basic && crafter-build --debug-api -r - **Library and core tests** run in-process, against a `Session` built with `listen = false` and a fake transport. - **`ShouldRunClientCommands`** runs the real client against a real session that way. - **`ShouldServeOverQuic`** runs a listening session and drives it over loopback with the client's own QUIC transport. It covers discovery, calls, `log --follow`, wrong tokens, oversized requests, parallel requests, and shutdown with a client connected. -- **Crafter.Network** comes from forgejo, or from `../Crafter.Network` with `--local`. To build against another checkout, a worktree say, set `CRAFTER_DEBUG_NETWORK` to its `project.cpp`. +- **Crafter.Network** comes from forgejo, or from `../Crafter.Network` with `--local`. - **`AGENTS.template.md`** has the conventions. Licensed LGPL-3.0-only; the examples are MIT. diff --git a/examples/Basic/AGENTS.template.md b/examples/Basic/AGENTS.template.md index cea1504..058abd3 100644 --- a/examples/Basic/AGENTS.template.md +++ b/examples/Basic/AGENTS.template.md @@ -14,4 +14,4 @@ A Crafter.Debug example: a headless simulation of balls dropped onto a floor sla ## Working on Crafter.Debug from here -`project.cpp` loads Crafter.Debug from this checkout (`#pragma crafter dependency "../.."`). Crafter.Network's callback API, which the transport needs, may not be on Network's `master` yet. If it isn't, build with `CRAFTER_DEBUG_NETWORK=/project.cpp`. +`project.cpp` loads Crafter.Debug from this checkout (`#pragma crafter dependency "../.."`), so a change there shows up in the next build here. diff --git a/project.cpp b/project.cpp index be39bc3..6e03b38 100644 --- a/project.cpp +++ b/project.cpp @@ -14,8 +14,7 @@ // Debug::Use (tooling/), which also writes their launcher. // // The library and the client talk QUIC through Crafter.Network, which comes -// from forgejo, with --local from the checkout beside this one, or from the -// project.cpp $CRAFTER_DEBUG_NETWORK names (a Network worktree). +// from forgejo, or with --local from the checkout beside this one. import std; import Crafter.Build; namespace fs = std::filesystem; @@ -39,9 +38,6 @@ namespace { // than one module built twice. Configuration* Network(std::span args) { const std::vector forwarded(args.begin(), args.end()); - if (const char* local = std::getenv("CRAFTER_DEBUG_NETWORK"); local != nullptr && *local != '\0') { - return LocalProject({ .projectFile = local, .args = forwarded }); - } if (std::ranges::find(args, std::string_view("--local")) != args.end()) { return LocalProject({ .projectFile = Root().parent_path() / "Crafter.Network" / "project.cpp", .args = forwarded }); }