Add API documentation#36
Conversation
| /// Returns whether the position is strictly inside this range. | ||
| public func contains(_ position: Position) -> Bool { | ||
| return position > start && position < end | ||
| } |
There was a problem hiding this comment.
Note: see #34
This implementation should be corrected.
|
Hello, and glad the library has been useful. Just so I understand correctly, you have not read each change personally? |
|
Yes, good call. I'll read it more carefully today. |
|
No no, that's ok! I wasn't trying to make work for you. I just wanted to better understand. I won't lie, I'm quite hesitant here. First, this is very large number of changes. But, more so, the lack of documentation prompts you to look at the official spec. Which I think might be ok compared to the promise of local documentation that was not actually human written? |
|
Yeah, I get that. Better have nothing but reliable than something that might be inaccurate. I'll see if I can do this copying manually, it probably wouldn't take much longer than just reviewing the PR in detail, and then we can be 100% accurate. |
As a frequent happy user of this library, I was missing API docs from declarations on this library, often browsing the specification on what certain properties are.
I used Claude Opus 4.6 Thinking with Windsurf to add in-source documentation to this library. I totally understand if this kind of contribution is not welcome, I just wanted to be upfront about it. I tried my best to ensure the quality of these docs, see my process below. If this is merged, I can also follow the same process for documenting LanguageServer.
I made the prompt based on Hylo's coding conventions for documentation:
After planning, it came up with the following plan:
Plan.md
Review
AI-assisted review
After completion, I executed a separate review of the documentation 2 times, during which it completed API documentation it missed previously, and corrected 3 comments that were slightly wordy or inaccurate.
Manual review
After the AI-assisted review, I read through the PR quickly to see if there is anything obviously inaccurate/badly phrased. I noticed that it removed the
@sincetags from existing comments, so I run another pass to update them.add `@since`
I run another pass of AI-assisted review to check if the
- Sinceannotations match up with the LSP specification's information. There were no inaccuracies found in this pass.