Skip to content

docs(macros): add panic and error documentation to generated clients#1676

Open
respp wants to merge 8 commits into
stellar:mainfrom
respp:main
Open

docs(macros): add panic and error documentation to generated clients#1676
respp wants to merge 8 commits into
stellar:mainfrom
respp:main

Conversation

@respp

@respp respp commented Jan 13, 2026

Copy link
Copy Markdown

@leighmcculloch leighmcculloch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! A couple asks inline.

Comment thread soroban-sdk-macros/src/derive_client.rs Outdated
Comment thread soroban-sdk-macros/src/derive_client.rs Outdated
Copilot AI review requested due to automatic review settings January 14, 2026 02:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds documentation comments to generated client methods explaining their panic and error behavior. The changes improve developer experience by clearly documenting when methods may panic versus when they return errors.

Changes:

  • Added panic documentation to regular client methods (lines 236, 263)
  • Added error handling documentation to try_ client methods (lines 249, 297)

Comment thread soroban-sdk-macros/src/derive_client.rs Outdated
Comment thread soroban-sdk-macros/src/derive_client.rs Outdated
@respp

respp commented Jan 14, 2026

Copy link
Copy Markdown
Author

Hi @leighmcculloch, I've updated the documentation following the standards for the # Panics and # Errors headings.

Additionally, I noticed that the function returns Ok(Err(...)) when a type conversion fails.
Let me know if you agree with this addition

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.

3 participants