Merged
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new type_def reflection/parsing system (replacing the previous api_def approach) and updates the derive/attribute macros plus downstream crates to use the new model.
Changes:
- Added a new
agdb::type_defmodule (types + tests) to represent reflected structs/enums/traits/functions/impls and expressions. - Replaced the old
agdb_derive::api_defmacro implementation with a newtype_def_parserpipeline (struct/enum/impl/trait/function/expression parsing). - Updated
agdbandagdb_apicode to referencetype_defand added new proc-macro attributes (trait_def,fn_def) where needed.
Reviewed changes
Copilot reviewed 49 out of 49 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| agdb_derive/src/type_def_parser/trait_parser.rs | New parser to emit Type::Trait definitions from syn::ItemTrait. |
| agdb_derive/src/type_def_parser/struct_parser.rs | New struct parser emitting Type::Struct definitions. |
| agdb_derive/src/type_def_parser/impl_parser.rs | New impl-block parser emitting ImplDefinition metadata. |
| agdb_derive/src/type_def_parser/generics_parser.rs | New generics extraction/rendering + type parsing helpers. |
| agdb_derive/src/type_def_parser/function_parser.rs | New function/signature/trait-fn parsing for reflection. |
| agdb_derive/src/type_def_parser/expression_parser.rs | New expression AST extraction into type_def::Expression. |
| agdb_derive/src/type_def_parser/enum_parser.rs | New enum parser emitting Type::Enum definitions. |
| agdb_derive/src/type_def_parser.rs | New module wiring + macro entrypoints for type/impl/trait/fn parsing. |
| agdb_derive/src/lib.rs | Switches proc-macro exports to type_def_parser and adds trait_def/fn_def. |
| agdb_derive/src/api_def/type_def.rs | Removes legacy api_def type parsing implementation. |
| agdb_derive/src/api_def/tuple_def.rs | Removes legacy tuple parsing implementation. |
| agdb_derive/src/api_def/struct_def.rs | Removes legacy struct parsing implementation. |
| agdb_derive/src/api_def/statement.rs | Removes legacy statement parsing implementation. |
| agdb_derive/src/api_def/generics.rs | Removes legacy generics parsing implementation. |
| agdb_derive/src/api_def/function_def.rs | Removes legacy function parsing implementation. |
| agdb_derive/src/api_def/expression_parser.rs | Adds/updates expression parser under api_def directory (legacy path). |
| agdb_derive/src/api_def/expression/pattern.rs | Removes legacy pattern parsing module. |
| agdb_derive/src/api_def/expression/path.rs | Removes legacy path parsing module. |
| agdb_derive/src/api_def/expression/op.rs | Removes legacy operator parsing module. |
| agdb_derive/src/api_def/expression/object.rs | Removes legacy object/struct parsing module. |
| agdb_derive/src/api_def/expression/macros.rs | Removes legacy macro parsing module. |
| agdb_derive/src/api_def/expression/loops.rs | Removes legacy loop parsing module. |
| agdb_derive/src/api_def/expression/literal.rs | Removes legacy literal parsing module. |
| agdb_derive/src/api_def/expression/conditionals.rs | Removes legacy conditional parsing module. |
| agdb_derive/src/api_def/expression/closure.rs | Removes legacy closure parsing module. |
| agdb_derive/src/api_def/expression/call.rs | Removes legacy call parsing module. |
| agdb_derive/src/api_def/expression/block.rs | Removes legacy block parsing module. |
| agdb_derive/src/api_def/expression/array.rs | Removes legacy array parsing module. |
| agdb_derive/src/api_def/expression.rs | Removes legacy expression module facade. |
| agdb_derive/src/api_def/enum_def.rs | Removes legacy enum parsing implementation. |
| agdb_derive/src/api_def.rs | Reworks legacy module to mirror the new parser structure (module-level refactor). |
| agdb_api/rust/src/http_client.rs | Updates API client traits/types to use type_def and new macros. |
| agdb_api/rust/src/client.rs | Updates AgdbApiClient reflection trait bounds + adds trait_def attribute under api feature. |
| agdb/src/type_def/trait_def.rs | Adds type_def::Trait representation + tests. |
| agdb/src/type_def/struct_def.rs | Adds type_def::Struct representation + tests. |
| agdb/src/type_def/impl_def.rs | Adds type_def::Impl representation + tests. |
| agdb/src/type_def/function_def.rs | Adds type_def::Function representation + tests. |
| agdb/src/type_def/enum_def.rs | Adds type_def::Enum representation + tests. |
| agdb/src/type_def.rs | Adds type_def public module (types, traits, literals, pointers, etc.). |
| agdb/src/query_builder/search.rs | Updates reflection trait bounds to type_def + adds trait_def attribute under api feature. |
| agdb/src/lib.rs | Renames api_def module export to type_def and re-exports new proc-macro attributes. |
| agdb/src/api_def/tuple_def.rs | Removes legacy runtime api_def tuple type. |
| agdb/src/api_def/struct_def.rs | Removes legacy runtime api_def struct type. |
| agdb/src/api_def/function_def.rs | Removes legacy runtime api_def function type. |
| agdb/src/api_def/expression_def.rs | Removes legacy runtime api_def expression AST. |
| agdb/src/api_def/enum_def.rs | Removes legacy runtime api_def enum type. |
| agdb/src/api_def.rs | Removes legacy api_def module entrypoint/types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
agnesoft
approved these changes
Apr 25, 2026
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.