Repository navigation
refactor(examples)!: use typed HTTP plugin construction - #145
Merged
Merged
Conversation
Hide HTTP sample implementations in their cpp files, register owned interfaces through private factories and export plugin entries explicitly. Preserve the disabled application-example selection and the existing request/listener flow. Exercise real example libraries through core validation when their public dependencies are available, with synchronized bilingual usage and migration notes. BREAKING CHANGE: the HTTP server sample interface is now http_server_sample_module, and both example implementation classes are private. Rebuild the example libraries and host together and use typed plugin lookup instead of constructing example implementations directly.
Co-locate each server role's headers and cpp files, and replace creation macros with the existing module/plugin bases, private typed factories and explicit dynamic-library entry points. All nine modules retain disabled updates and existing business/lifecycle bodies. Build-only forwarding preserves 28 legacy source include paths; public installed headers are unchanged. Seven enabled server libraries are covered. Simulate remains disabled and is not claimed as natively accepted. English/Chinese directory and architecture documentation describe the resulting layout and verification boundary. Validation on macOS with the arknet 0.2.3 release tree and Boost/TLS: - All seven actual DSOs load, export both entry points and unload in isolated test processes. - Actual factory/assembly tests preserve interface keys, disabled updates, duplicate rejection and reinstall; counted rejection tests verify destruction, and a controlled Login module verifies the real manager entry/exit path. - Full `check-core` passes, including 59 core cases / 2,882 assertions and the existing application, Bus, Net and newly accepted Kernel DSO regressions. - 130 policy tests, clang-format 18 and bilingual Nimbus checks pass: 135 pages and 265 internal references. The DSO export probes run separately from hosts compiling the real implementations, preventing duplicate static Protobuf descriptor registration. These checks do not exercise full business initialization or establish deployment capacity. Hosted cross-platform merge-candidate checks remain required; the draft waits behind older admitted PRs. BREAKING CHANGE: concrete server plugin/module inheritance layouts change. Rebuild consumers and runtime libraries together; the 28 legacy source header paths remain available.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The retained HTTP examples still used creation macros, and the server example reused the public HTTP service's type name, preventing compilation. Both examples now keep implementation classes in their cpp files, register owned sample interfaces through private factories, and export their plugin entry points explicitly.
The application examples remain disabled by default. The request bodies, endpoint and timeout defaults, callback dispatch, listener arguments and lifecycle behavior are preserved. When core tests have Boost and the HTTP/Net/Etcd Client API targets available,
check-corenow builds and runs the actual example shared libraries with controlled service implementations; explicit test opt-out remains supported. English and Chinese documentation covers the build conditions and migration.Validation: final source
5b16d3ff030c4ab0444bb563ca0ca3c6b95cd14aincorporates the exact #144 merge candidate. Its complete tree2275c7aa800d94f591e650fc16ebdf409fe7a503is identical to the locally tested #143/#144/#145 combination: 133 policy checks; nativecheck-corewith 60 core cases / 2,885 assertions, all seven server plugin DSOs and factories, Kernel/Net/Bus/HTTP wire regressions and both actual HTTP example DSOs; clang-format 18; Nimbus with 135 HTML pages / 269 internal references and 24 affected bilingual HTML/Markdown outputs. The final merge also passes post-commit formatting. The initial expanded native build rejected mixed Homebrew/vcpkg Protobuf versions; matching Protobuf/protoc/Abseil package paths resolved the environment failure without changing source. No external etcd or production capacity acceptance is claimed. Protected source and cross-platform merge-candidate acceptance remain required.BREAKING CHANGE: the server sample lookup type is
http_server_sample_module; both example implementation classes are private. Rebuild example libraries and hosts together and load the plugin/use its sample interface instead of directly constructing an implementation. Installed public headers and public HTTP/etcd service APIs are unchanged.