You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This RFC is a brainstorm of sorts intended to kickstart and organize a discussion around aspects of the stdlib developer development experience which could be improved.
While we have invested considerable time and resources in automation and tooling, gaps still exist, and we can do more to reduce the initial barrier to first contribution. The benefit of continuing to invest in automation and tooling is to stdlib's benefit as it should allow faster development, a smoother onboarding experience, and reduced core developer burden.
Some initial ideas include:
More comprehensive C linting
I did some initial exploration regarding Clang and clang formatting. Getting this over the finish line would be a major milestone, as currently we only use cppcheck which only captures a fraction of our C style and formatting needs.
Compiling Node.js native add-ons pre-push
We can update our Git pre-push hook to not only compile C examples and benchmarks (as we already do), but to also compile any native add-ons. This will ensure that (a) native add-ons compile and (b) native add-ons are compiled prior to running unit tests as part of the hook.
Compiling and running C markdown code blocks.
Currently, we run JavaScript code blocks in Markdown files as part of our pre-push Git hook. It would be good if we could do the same for all of our C Markdown examples. Note that this would likely entail that we'd need to add a new configuration in our manifest.json files specifically tailored to running C documentation examples, as documentation may have different dep requirements than benchmarks, examples, and compiling an add-on.
C doctesting
Would be nice to extend doctesting to C documentation and examples, similar to how we perform doctesting on JavaScript JSDoc examples.
Enable doctesting and linting of index.js files
This would help to catch documentation bugs stemming from copy-paste errors. It is not uncommon for us to have omitted changes in index.js files, especially around updated return values.
More robust linting and doctesting of TypeScript declaration files
Currently, our linting of TypeScript declaration files is limited. It would be great to more comprehensively lint these files by applying more ESLint rules. Even better would be extending doctest support to these files.
manifest.json linting and validation
Incorrect manifest.json configuration is a common source of bugs, especially their formatting and included dependencies. It would be good to add additional utilities similar to what we do for package.json files for validating and auto-formatting manifest.json files.
/stdlib command that core devs can use to run ESLint autofix for selected lint rules
For example, we don't enforce uniform spacing inside parentheses and brackets, but we are usually consistent. The idea here would be to turn on enforce spacing for PRs by external contributors so that everything gets uniformly formatted as a starting point.
Windows development guide
New contributors on Windows still face significant hurdles, as we don't have any documentation tailored to their situation. Namely, their need to use the Windows Linux Subsystem in order to be able to use Make, which is the backbone of our tooling.
A lint-pkg recipe
We have various lint rules for linting particular file subsets (benchmarks, source files, examples, tests, etc), but we don't have a single command for linting everything in a package. In short, this recipe would allow specifying a package path filter and then pass that along to the various specialized commands.
Tutorials/how-to guides for creating new packages
Videos/screencasts/docs are needed to better allow new contributors to go from zero to hero. Seeing a core dev create a new package from scratch would be highly beneficial, as core devs can narrate what they are doing and why.
Project make commands take some getting used to, so having a dedicated tutorial/guide would go a long way toward getting new contributors comfortable with using our tooling.
Cookiecutter tooling
We can do more to help scaffold new packages/files. I personally have a collection of snippets which helps me quickly add tests, license headers, and more. This sort of thing has been talked about internally for some time, but has always proven a bit tricky to pull off.
A more streamlined local dev setup process
A developer should be able to just clone and run, say, make dev-setup, which then
installs Node.js to a local folder
installs node modules dependencies
installs certain dev deps (e.g., EditorConfig, shellcheck, etc)
initializes Git hooks
verifies local setup
More comprehensive docs/tutorials linking together the dev setup, REPL text guide, doc testing, benchmark authoring, Git commit message conventions, and more.
Currently, these are all scattered and don't form a single story for how all the pieces come together.
Command-line workshopper
An interactive command-line workshopper (similar to the Node school framework in the olden days) which walks a contributor step-by-step through creating a new package and auto-opens guides in a local web browser, etc.
Related Issues
None.
Questions
What other things can we do to improve the developer experience? Feel free to leave comments below.
Description
This RFC is a brainstorm of sorts intended to kickstart and organize a discussion around aspects of the stdlib developer development experience which could be improved.
While we have invested considerable time and resources in automation and tooling, gaps still exist, and we can do more to reduce the initial barrier to first contribution. The benefit of continuing to invest in automation and tooling is to stdlib's benefit as it should allow faster development, a smoother onboarding experience, and reduced core developer burden.
Some initial ideas include:
More comprehensive C linting
cppcheckwhich only captures a fraction of our C style and formatting needs.Compiling Node.js native add-ons pre-push
Compiling and running C markdown code blocks.
manifest.jsonfiles specifically tailored to running C documentation examples, as documentation may have different dep requirements than benchmarks, examples, and compiling an add-on.C doctesting
Enable doctesting and linting of
index.jsfilesindex.jsfiles, especially around updated return values.More robust linting and doctesting of TypeScript declaration files
manifest.jsonlinting and validationmanifest.jsonconfiguration is a common source of bugs, especially their formatting and included dependencies. It would be good to add additional utilities similar to what we do forpackage.jsonfiles for validating and auto-formattingmanifest.jsonfiles./stdlibcommand that core devs can use to run ESLint autofix for selected lint rulesWindows development guide
A
lint-pkgrecipeTutorials/how-to guides for creating new packages
makecommands take some getting used to, so having a dedicated tutorial/guide would go a long way toward getting new contributors comfortable with using our tooling.Cookiecutter tooling
A more streamlined local dev setup process
A developer should be able to just clone and run, say,
make dev-setup, which thenMore comprehensive docs/tutorials linking together the dev setup, REPL text guide, doc testing, benchmark authoring, Git commit message conventions, and more.
Command-line workshopper
Related Issues
None.
Questions
Other
No.
Checklist
RFC:.