-
Notifications
You must be signed in to change notification settings - Fork 0
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
Facility for keeping source code line numbers synced in the documentation #48
Comments
Prior art:
Cursory glance reveals no such solution in the ecosystem |
Maybe compute a kind of source map (actually symbol => (file, line number) pairs). Store this "source map" in the container image. Then have a webservice, something like
=> we can then redirect to the repo UI for that line. |
AlternativesAutomatically generate structure like functions to filename and lineSource mapsJavascript source maps could in theory be used. CtagsLSIFManually annotate "code bookmarks"Pro of this approach is that it supports marking any section you like, be it function, global variable, local variable, list of imports etc etc. It also doesn't pollute the DB with all symbols but instead carefully opt-in symbols. Also it's one layer of indirection - you rename a function it doesn't break links when the human-came-up-with-symbol-name can be a permalink. There doesn't seem to be a ready tool or a standard file format for this. But a tool should be easy to make. WIP: https://github.com/function61/turbobob/tree/feature/code-bookmarks |
Something like pipeline:
search line numbers of interesting places in code
->database of line numbers for interesting places
->see that documentation has up-to-date links for those URLs
We could also extract that database to machine-readable DB so we could build a URL redirect service like "link to source code for main entrypoint of this project" where the redirect service could access that machine-readable file and then redirect to that line number in GitHub (and such) UI
The text was updated successfully, but these errors were encountered: