cli: add show-extensions command to list extension hook points#10023
cli: add show-extensions command to list extension hook points#10023iav wants to merge 2 commits into
show-extensions command to list extension hook points#10023Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughAdds two new CLI commands ( ChangesHook-discovery CLI feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Statically scans the build sources for call_extension_method sites and prints the available extension hook points. Unlike the build-time auto-generated docs, the list is exhaustive regardless of which hooks a given build triggers, and needs no board config or Docker. Default output is the sorted hook names; SHOW_EXTENSIONS=docs emits Markdown with each hook's inline documentation. Suggested in armbian/documentation#859. Assisted-by: Claude:claude-opus-4-8
|
Is this redundant to https://github.com/armbian/build/blob/main/extensions/gen-sample-extension-docs.sh ? |
Not redundant — they overlap in intent but differ in mechanism and use case.
So: runtime/build-coupled/config-specific vs static/no-build/complete. The |
|
While I think this is useful, saying we humans will be able to grok that grep / awk black magic in the future is a stretch. One case I think it might choke is when extensions themselves define new hook points -- which is supported, but currently not used. |
Fair — the awk is dense. Two things that I think take the long-term-maintenance risk off the table: It only has to recognize one shape: the
That case already exists and is covered — the scan walks The one place it intentionally degrades is runtime-templated names: If you had a different pattern in mind for "define new hook points" (e.g. a hook name assembled at runtime inside the extension), point me at it and I'll cover it. |
|
Fair. I won't oppose this... |
What
Adds a
show-extensionsCLI command (aliasshow-hooks) that lists the extension hook points available in the build framework.Why
The hooks documentation is auto-generated only during a build, so it captures just the hooks a given build path actually triggers and is therefore incomplete. armbian/documentation#859 documents this and works around it with a manual
grepone-liner; igorpecovnik suggested baking that into a command instead.How
lib/andextensions/forcall_extension_methodcall sites, so the list is exhaustive regardless of board/branch/release and needs no board config or Docker.SHOW_EXTENSIONS=docsemits Markdown with each hook's inline documentation and backward-compat aliases — a static, complete equivalent of the build-timehooks.auto.docs.md.Informational command only; builds nothing.
🤖 Generated with Claude Code
Summary by CodeRabbit
show-extensionsandshow-hooksCLI commands to discover available framework hooks.