Add comments to FFI interface#1653
Conversation
16bd259 to
be2a14d
Compare
Coverage Report for CI Build 27715375187Coverage remained the same at 85.224%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
be2a14d to
3454b76
Compare
|
Haven't had the chance to check that these are identical to the underlying docs yet, did you @caarloshenriq ? Wondering how comment consistency might be automated going forward so that comments stay fresh with the underlying functions they're bound to. Without automation we will run into this issue again for sure. |
|
I am not sure automation is completely possible just because the interface is inherently slightly different. Might work well with some sort of AI prompt you run every few months? At this point there really shouldn't be large scale changes to the interface right? As far as matching the PDK doc strings, I would say they don't match in style but are much more consistent and (imo) clear. I actually was planning to submit a PR revamping the PDK doc strings to match the consistency of these FFI doc strings after the async compatible interface got merged just so see what people thought about it, but would be happy to submit that sooner if there is interest in that. |
|
So I guess what I am saying is that I intentionally did not verbatim copy the existing doc strings because I think the existing doc strings themselves should be improved. |
Yes, I cross-checked each new comment against the core implementation before leaving my own review notes Verifying accuracy, not verbatim match, so the intentional style improvements make sense. On automation: I think there's no clean native mechanism in Rust/uniffi for FFI wrappers to inherit doc comments from the underlying types. The |
Summary
Adds some nice comments to the FFI receive interface in order to have consistent doc strings across type states.
Claude AI was used to collaboratively create many of these comment strings.
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.