Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Documentation #115

Open
KarthikRIyer opened this issue Jan 28, 2020 · 3 comments
Open

Library Documentation #115

KarthikRIyer opened this issue Jan 28, 2020 · 3 comments

Comments

@KarthikRIyer
Copy link
Owner

@karwa I am not able to recall what you'd said about updating the docs. From what I can recall, you'd suggested to remove it from the README and instead use some specific kind of comments in the code. What would be the advantage apart from the README getting cleaner? Could you please describe it briefly? Sorry I'm unable to recall where we had that conversation. 😅

@karwa
Copy link
Contributor

karwa commented Jan 29, 2020

I don't know where that conversation is.

Swift has an official documentation comment style which is a kind of markdown and understood by the compiler. This has lots of benefits: for one thing, it's less likely to go out-of-date because it lives with the code, and compiler-integrated tooling like SourceKit can use it for documentation popouts in any editor. Tools like the refactoring engine are also aware of it (e.g. if you rename a parameter in Xcode using CMD+SHIFT+E, it will also rename the parameter in the documentation).

We can also use this tooling to generate documentation. The link above has one example. There are also loose plans to create a swift doc compiler mode which would use these to generate something like a unix manpage (discussion)

@karwa
Copy link
Contributor

karwa commented Feb 5, 2020

Also, https://github.com/SwiftDocOrg/swift-doc is an interesting project, able to generate documentation from the markdown format.

There are still some issues, and although there's a GitHub action, I couldn't get it to automatically generate Wiki pages on my fork. That said, it does a reasonable job:

image

@KarthikRIyer
Copy link
Owner Author

KarthikRIyer commented Feb 5, 2020

This looks really interesting!! Sorry for not being active lately. I've been busy in a hackathon ( that my team eventually won :D ) and have some upcoming presentations. I'll try catching up to everything I've missed this weekend.

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

No branches or pull requests

2 participants