chore(transport): drop the CRAFTER_DEBUG_NETWORK hook
The transport needed Crafter.Network's callback API, which lived on an unpushed branch, so project.cpp took Network from whatever project.cpp $CRAFTER_DEBUG_NETWORK named. That API and the ~ClientQUIC fix are on Network's master now (79a2f12), so the hook goes: Network comes from forgejo, unpinned, or from ../Crafter.Network with --local, as before. The notes and the README stop telling people to set it, and say which Network the transport needs. Every test passes with Network cloned from forgejo, and the example builds and is driven end to end that way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4a0d911e69
commit
653813e1e3
4 changed files with 6 additions and 10 deletions
|
|
@ -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=<path to a project.cpp>` 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
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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=<a Network checkout that has it>/project.cpp`.
|
||||
`project.cpp` loads Crafter.Debug from this checkout (`#pragma crafter dependency "../.."`), so a change there shows up in the next build here.
|
||||
|
|
|
|||
|
|
@ -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<const std::string_view> args) {
|
||||
const std::vector<std::string> 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 });
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue