What is good polish in a library for people to use...
# library-development
j
What is good polish in a library for people to use? Unit tests, docs, coverage, markers, publication, anything else? We have internal stuff, but the transition from internal to public is a struggle for me. I'm still figuring out how to bridge the gaps.
m
docs and samples are super important
For better or worse, no one finds the unit tests (despite the fact that they can be pretty good sample code)
coverage is mainly for maintainers
To me it boils down to: getting started, guides, sample app, api reference (Kdoc)
If your lib runs on the web, a live demo is also good
j
Thanks! Yeah, for me it usually comes down to the simple sample on the front of the readme, a screenshot, and the live demo. Never look at kdocs these days myself though - I just go to source since the docs are in the comments there anyways, but I'm probably weird that way
m
I'm the same when coding. KDocs are useful to link in discussions and/or to reference older versions of the symbols
The KDocs comment are important and once you have them, publishing them is quite easy
So it's a nice bonus but yea, not the most important thing IMO
j
Fair enough - I set up kdocs initially but it took up the vast majority of the build process and took a shocking amount of ram at the time. I'll have to go back and figure that out.
m
It is definitely slow and resource heavy
I only run it from CI so I don't mind too much though
r
Consider enabling the binary compatibility verifier. It's not perfect but it's a good check that you're not exposing anything you don't mean to, and that you're not breaking any existing usage by accident
thank you color 1
j
Yeah, I'd better do that in this transition. I've only been keeping source compatibility for the most part and that's gonna have to change.
c
Publishing KDocs can be a good way to give visibility to the library, as it increases the number of results on Google when searching for it 😅
💡 2