Skip to content

[api] List the API type defs #1778#1779

Merged
michaelvlach merged 2 commits intomainfrom
1778-api-list-the-api-type-defs
Apr 25, 2026
Merged

[api] List the API type defs #1778#1779
michaelvlach merged 2 commits intomainfrom
1778-api-list-the-api-type-defs

Conversation

@michaelvlach
Copy link
Copy Markdown
Collaborator

No description provided.

@michaelvlach michaelvlach linked an issue Apr 25, 2026 that may be closed by this pull request
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agdb Ready Ready Preview, Comment Apr 25, 2026 10:24am

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an “API catalog” of type definitions for the Rust agdb_api crate and updates trait type-def generation to produce TypeDefinition implementors that can be enumerated.

Changes:

  • Update #[agdb::trait_def] expansion to emit a *Def marker struct implementing TypeDefinition (instead of a __*_type_def() free function).
  • Introduce agdb_api::api::Api::type_defs() to return a curated list of (Type, Vec<Impl>) for the public API surface, with tests validating closure/type-graph resolvability and catalog completeness.
  • Add/adjust feature-gated exports to make required type/trait defs accessible under the api feature.

Reviewed changes

Copilot reviewed 6 out of 6 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 Changes trait macro output to generate a *Def struct implementing TypeDefinition.
agdb_api/rust/src/lib.rs Feature-gates the new api module and re-exports generated *Def marker types.
agdb_api/rust/src/api.rs Adds the API type-def catalog and graph validation tests.
agdb/tests/api_def_reflection_test.rs Updates tests to use *Def::type_def() instead of __*_type_def().
agdb/src/type_def/trait_def.rs Updates internal trait-def tests for the new *Def::type_def() access pattern.
agdb/src/lib.rs Feature-gated re-exports of additional API-relevant types to support catalog construction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agdb_derive/src/type_def_parser/trait_parser.rs
@michaelvlach michaelvlach merged commit eebfcc9 into main Apr 25, 2026
11 checks passed
@michaelvlach michaelvlach deleted the 1778-api-list-the-api-type-defs branch April 25, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[api] List the API type defs

4 participants