Generated service packages can re-export a large set of common runtime declarations from the Loom runtime package. When this happens, each generated package becomes partly a tunnel for shared framework API instead of containing only service-specific generated API.
Generic example:
package orders
type Endpoint = loom.Endpoint
type Middleware = loom.Middleware
type ServerOption = loom.ServerOption
// ... many more common runtime aliases
type Service interface {
ListOrders(...) (...)
}
This creates avoidable namespace noise and makes generated package docs harder to scan because service-specific types are mixed with many framework-level aliases.
Requested improvement:
Prefer importing framework runtime types directly where needed, or centralize common aliases in one generated support package instead of repeating broad re-export sets in every generated service package.
Acceptance criteria:
- Generated service packages primarily expose service-specific contracts and wire types.
- Common Loom runtime declarations are not broadly re-exported from every generated package.
- Existing code can still access runtime concepts through an explicit framework import or a single stable generated support package.
- The generated output remains deterministic and gofmt/go vet clean.
Generated service packages can re-export a large set of common runtime declarations from the Loom runtime package. When this happens, each generated package becomes partly a tunnel for shared framework API instead of containing only service-specific generated API.
Generic example:
This creates avoidable namespace noise and makes generated package docs harder to scan because service-specific types are mixed with many framework-level aliases.
Requested improvement:
Prefer importing framework runtime types directly where needed, or centralize common aliases in one generated support package instead of repeating broad re-export sets in every generated service package.
Acceptance criteria: