-
Notifications
You must be signed in to change notification settings - Fork 10
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
Scaladoc and publishing it #47
Conversation
This is also basically a thorough code analysis, with a bunch of TODOs…
[skip ci]
Augments the POM such that Scaladoc belonging to a consumer of our API can automatically link externally to our docs. [skip ci]
Scaladoc and publishing it [ci skip]
Hmm, it seems like the published docs include a full local file path that breaks the links to source code—see for example this page on the The My unfounded suspicion (not reading source or trying to test yet…) is that maybe the
There is a space in the generated path. @terryhorner could you try copying your checkout to, say, |
Derp! My bad on that one @ches. Should be all fixed up now. |
No worries, thanks! Did that fix it (running from a path with no spaces, or symlinks)? Wondering if this is reported already. |
Yup, running it from a path with no spaces fixed it. |
This branch contains no functional changes, so I
[ci skip]
ed it—you can trust me that the SBT configuration works, or try it out yourself 😄What this does
Client
andHttpAdapter
.master
if it's aSNAPSHOT
.Adding a lot of documentation basically amounted to a close-reading of the code, and I added a lot of todos along the way… That might be noisy but my goal would be for those to be eliminated by 1.0 or at worst moved out of documentation comments. I welcome thoughts on any of those todos inline.
Scaladoc does pretty smart inheritance of documentation from parent classes/traits automatically, with
@inheritdoc
only needed if you wish to append to a parent's doc. So, I moved some documentation to parents likeEventStore
so implementors can understand how they're supposed to work.Caveats
One little piece of the story is unfortunately broken currently: publishing multiple versions of the API docs to GitHub Pages.
sbt-site
correctly builds into versioned paths like/api/0.6.0/
, butsbt-ghpages
clobbers all the content in thegh-pages
branch every time you publish, leaving only the most recent. I consider this a bug, the documentation of the task specifically says it shouldn't do that. I'm going to try to submit a pull request to change it, but the project has been inactive so it might take awhile.This doesn't really diminish the usefulness of everything done here so far, it just means that unfortunately people may stumble across rotted links to docs for earlier versions until this gets resolved. Once there's a fix we'll just need to update
sbt-ghpages
and everything should keep working, without the loss of doc versions from then on.Initializing the project's GitHub Pages
Ignore the
sbt-ghpages
instructions for creating thegh-pages
branch—they're prone to potentially dangerous error. Here is what I did to test on my fork, using GitHub's official documentation except with an empty commit to establish the branch:Create and push the branch before trying to run
sbt ghpagesPushSite
—under the hood it actually clones a sandbox copy of the repo beneath~/.sbt/ghpages
, and it expects the branch to already exist so it can check it out. The documentation doesn't cover these subtleties very well, but the sandbox approach is nice since it avoids potentially bungling up things in your working copy when it's automating thegh-pages
branch dance.Remember that we still have
version
at0.6.0
inbuild.sbt
currently, so you might want to change that to an0.7.0-SNAPSHOT
or something before publishing docs, since there have been changes since the last release.