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

Improving the relationship between devdocs and code #29527

Open
c42f opened this issue Oct 5, 2018 · 0 comments
Open

Improving the relationship between devdocs and code #29527

c42f opened this issue Oct 5, 2018 · 0 comments
Labels
docs This change adds or pertains to documentation

Comments

@c42f
Copy link
Member

c42f commented Oct 5, 2018

I've been working on the julia internals on and off when I get the time, for example, over at #28878.

One thing I've been finding is that I don't always get the benefit of the devdocs, as I tend to read the code and code comments as a first resort, and don't always find some of the great tidbits of information available in the devdocs. I've been finding that the relationship between devdocs and the code itself strangely disjointed. It's hard to put my finger on what the problem is exactly, but I thought I'd open an issue to see what other people think. Perhaps it's just me and my overuse of grep (actually, ag) to discover things in the src and base directories.

Personally I like the code itself and inline contextual comments to tell the story of how things are, rather than relying on documentation which is elsewhere. For example, I love @yuyichao's documentation of the GC, and I love @Keno's documentation of the static analyzer annotations. These two are some of the better documented parts of the internals, but having the static analyzer documentation in doc/src/devdoc/gc-sa.md meant I found it only by accident when browsing rather than just finding it in the source at src/support/analyzer_annotations.h.

This leaves me wondering how we can make the documentation of the internals a little more uniform and accessible. A very simple approach would be to link from the code comments to the devdocs where applicable. This would certainly help, but I feel some of the markdown devdocs could be embedded in — or next to — the code which would make working with the code itself (using simple tools like grep) simpler and more contextual. If we want to extract these and insert them into the generated devdocs that would be possible with an automated extraction tool, in the same way that we document packages.

@JeffBezanson JeffBezanson added the docs This change adds or pertains to documentation label Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

2 participants