qqeasonchen opened a new pull request, #5321:
URL: https://github.com/apache/eventmesh/pull/5321
## Summary
Decouples `eventmesh-runtime` via internal sub-packages, following the same
pattern as #5298 (#5320) for `eventmesh-common`. The TCP transport is split
into a public-facing top-level `runtime.tcp` and a private
`runtime.tcp.internal` package; every other runtime sub-package gets a
`package-info.java` documenting its public/internal split, and a new
`:eventmesh-architecture-guard` ruleset enforces the boundary.
## What changed
- `eventmesh-runtime/.../runtime/transport/tcp/*` →
`eventmesh-runtime/.../runtime/tcp/*` (public) and
`eventmesh-runtime/.../runtime/tcp/internal/*` (impl)
- 4 public: `UniTcpServer`, `TcpIngressBridge`,
`MeshMessagePackageRouter`, `TcpAckRegistry`
- 6 internal: `NettyTcpPushChannel`, `PackageRouter`, `TcpFrameCodec`,
`TcpFrameDecoder`, `TcpPushChannel`, `TcpRequest`
- 3 test files moved to `runtime.tcp` (kept co-located with public API;
explicit cross-pkg imports added)
- 17 new `package-info.java` files document the public/internal split of
every runtime sub-package
- 5 new ArchUnit rules in `:eventmesh-architecture-guard`:
- `ruleRuntimeTcpInternalHidden` — no class outside `runtime.tcp` may
depend on `runtime.tcp.internal`
- `ruleRuntimeTcpInternalNoReverse` — internal classes must not depend on
public
- `ruleRuntimeEngineIsolatedFromInfra` — `boot`/`ingress`/`delivery` must
not depend on `tcp.internal`
- `ruleRuntimePushDoesNotImportCodec` — `runtime.push` must not depend on
`tcp.internal`
- `ruleRuntimeSubscriptionStateIsolated` — `runtime.ingress` must not
depend on `state.internal`
- Dead SPI removed: `META-INF/services/...IPayload`
- Empty `runtime.transport` package removed
## How to verify
```bash
./gradlew :eventmesh-common:check :eventmesh-runtime:check
:eventmesh-architecture-guard:check
```
Local: 10/10 ArchUnit tests pass, checkstyle clean, compileJava +
compileTestJava clean for all three modules.
## Fix commit chain (10 commits, walkable diff)
1. `8a263256` — main split
2. `be1f0937` — restore `state/package-info.java` content (preserved 6-store
description from #5301 Sub-PR A)
3. `41907525` — first import rewriter (had license-header detection bug)
4. `17cb6494` — fixed license-header detection
5. `5361fbf9` — fixed `import ;` syntax error from blank-line sentinel
6. `1b284825` — fixed cross-pkg dep detection for same-pkg refs in BASE
7. `c771f20d` — added cross-pkg imports for 3 test files
8. `7eba6a86` — static imports to top in test files
9. `f9b4bf70` — drop redundant same-pkg imports, wrap long lines, blank
before @Test
10. `6ef3c629` — add `:eventmesh-runtime` to arch-guard `testImplementation`
so runtime.* rules have classes in scope
Refs: #5297. Builds on #5298 / #5305 (PR #5320).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]