While most of the automated workflows for Node.js client libraries have mostly moved to synthtool, we still use the legacy @google-cloud/repo-tools package for dynamically generating README.md and samples/README.md based on what we have in the samples/ directory.
Seems like this is something we would want for other languages too, no? Should we consider adding this to synthtool? @theacodes @busunkim96
Yes, but let's start with Node.js.
Context for others - repo-tools does a lot of things, and we've been slowly moving away towards single purpose tools. Maintaining it has been hard, and at this stage the only thing yoshi is using it for is generating READMEs that embed samples. It's causing hella trouble.
So here's what I think we should do. I want to do this slow like, and responsibly:
README.md and samples/README.md manipulationgoogleapis/readme-generator Looking for input on the approach here @broady @bcoe @crwilcox @busunkim96 @fhinkel 鉂わ笍
nodejs-docs-samples and nodejs-getting-started is still using many of the test commands and things like repo-tools.getRequest() in the test code.
Got it. For our purposes - this is the last mile of dropping the dependency on repo-tools in the client libraries. We're not going to like delete the repo or anything :)
@fhinkel would definitely be curious to learn about how you're using the repo; wonder if it makes sense in synthtool too, or if we could trim down the features in node-repo-tools.
We very much need to sunset that thing.
https://github.com/googleapis/synthtool/pull/214 and https://github.com/googleapis/synthtool/pull/207 have pulled README generation into synthtool, which feels way more consistent (and also means our Node.js libraries won't drift way from a baseline over time; we need to fix the general case).
It would be really cool to try this approach with some other languages now that we have a strategy in place!
@fhinkel let's discuss outside of this issue your other use-cases of repo-tools, and decide whether the library can be deprecated entirely or not.
@bcoe I'm still discovering new ways of how repo-tools is used 馃ぃ
We use it in tests to make request. getRequest() adds some logic based on environment variables. https://github.com/GoogleCloudPlatform/nodejs-getting-started/blob/master/2-structured-data/test/_api-tests.js#L16
And we're using it to run the tests
https://github.com/GoogleCloudPlatform/nodejs-getting-started/blob/master/5-logging/package.json#L27
And I don't even know what that is
https://github.com/GoogleCloudPlatform/nodejs-getting-started/blob/master/5-logging/package.json#L13