feat(macros): builder params#926
Open
Berrysoft wants to merge 4 commits into
Open
Conversation
Co-authored-by: DeepSeek <service@deepseek.com>
96c496e to
2bdc5d3
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends compio-macros’s #[compio::main] / #[compio::test] attribute macros to accept runtime builder parameters and a nested with_proactor(...) configuration, and updates a couple of integration tests to use the new attribute-based configuration instead of manually building a runtime.
Changes:
- Reworks the
#[compio::test]macro implementation to share logic with#[compio::main]and emit a runtime builder chain. - Adds parsing/codegen for runtime builder params (
name = value) and proactor builder params viawith_proactor(name = value, ...). - Updates
compiocrate tests to configure the proactor via macro parameters.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| compio/tests/runtime.rs | Migrates a runtime/proactor configuration test to #[compio_macros::test(with_proactor(...))]. |
| compio/tests/accept.rs | Migrates accept test to #[compio_macros::test(with_proactor(driver_type = ...))]. |
| compio-macros/src/test_fn.rs | Removes the old dedicated test macro implementation. |
| compio-macros/src/main_fn.rs | Adjusts to delegate emission to shared RawBodyItemFn logic and supports “test mode”. |
| compio-macros/src/lib.rs | Routes #[proc_macro_attribute] test through the unified implementation and adds driver crate resolution helper. |
| compio-macros/src/item_fn.rs | Implements attribute argument parsing and codegen for runtime/proactor builder parameters. |
| compio-macros/README.md | Documents passing builder params, including with_proactor(...). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.