Skip to content

[11.0][A3] Remove deprecated HttpDispatcher class (staged; use createDispatcherPlugin) #2380

Description

@os-zhuang

Part of 11.0 breaking-change batch (#2364). Largest A-item — do in stages.

Remove the deprecated HttpDispatcher class (packages/runtime/src/http-dispatcher.ts, annotated "removed in v2"), superseded by createDispatcherPlugin().

Keep (do NOT remove)

The other exports in that file are NOT deprecated: HttpProtocolContext, HttpDispatcherResult, KernelResolver, HttpDispatcherOptions. (Also note: packages/services/service-messaging/src/http-dispatcher.ts is a different class — unrelated.)

Blast radius (~245 refs, 7 adapters)

  • runtime/src/index.ts public export of HttpDispatcher
  • 7 framework adapters import it: express, fastify, nextjs, nestjs, nuxt, sveltekit, hono (src/index.ts + each __mocks__/runtime.ts)
  • 5–6 runtime/src/http-dispatcher*.test.ts that new HttpDispatcher(...) directly

Staged plan

  1. Migrate the 7 adapters to import only the surviving types; route through createDispatcherPlugin()
  2. Confirm dispatcher-plugin.ts (createDispatcherPlugin) is the canonical entry
  3. Remove the public HttpDispatcher export (mark class @internal or delete); keep the 4 types exported
  4. Rewrite/relocate the http-dispatcher tests to exercise the plugin
  5. gen:api-surface + major changeset

Risk: high — own PR, staged, verify each adapter builds.

Activity

  1. os-zhuang commented on Jun 27, 2026

    @os-zhuang
    ContributorAuthor

    Resolved via #2391 (package removal), not class removal. Investigation found HttpDispatcher is the live dispatch engine for 7 adapters + plugin-msw, and createDispatcherPlugin is a kernel route plugin — NOT a drop-in. So the issue's premise didn't hold. Instead, the 6 unused non-Hono adapters + plugin-msw were removed (zero internal consumers, undogfooded), collapsing HttpDispatcher's consumers to the Hono adapter + the internal dispatcher-plugin. The misleading @deprecated → createDispatcherPlugin note is corrected. The class is fine to keep as-is now. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions