Validate actions in docs (#31073)
Adds a validation step to docs preprocessing so that actions referenced
in docs are checked against the list of all registered actions in GPUI.
In order for this to work properly, all of the crates that register
actions had to be importable by the `docs_preprocessor` crate and
actually used (see [this
comment](ec16e70336 (diff-2674caf14ae6d70752ea60c7061232393d84e7f61a52915ace089c30a797a1c3)
)
for why this is challenging).
In order to accomplish this I have moved the entry point of zed into a
separate stub file named `zed_main.rs` so that `main.rs` is importable
by the `docs_preprocessor` crate, this is kind of gross, but ensures
that all actions that are registered in the application are registered
when checking them in `docs_preprocessor`. An alternative solution
suggested by @mikayla-maki was to separate out all our `::init()`
functions into a lib entry point in the `zed` crate that can be imported
instead, however, this turned out to be a far bigger refactor and is in
my opinion better to do in a follow up PR with significant testing to
ensure no regressions in behavior occur.
Release Notes:
- N/A
This commit is contained in:
parent
52770cd3ad
commit
17c3b741ec
14 changed files with 216 additions and 48 deletions
|
@ -120,7 +120,7 @@ or by simply right clicking and selecting `Copy Permalink` with line(s) selected
|
|||
| {#action git::Branch} | {#kb git::Branch} |
|
||||
| {#action git::Switch} | {#kb git::Switch} |
|
||||
| {#action git::CheckoutBranch} | {#kb git::CheckoutBranch} |
|
||||
| {#action editor::ToggleGitBlame} | {#kb editor::ToggleGitBlame} |
|
||||
| {#action git::Blame} | {#kb git::Blame} |
|
||||
| {#action editor::ToggleGitBlameInline} | {#kb editor::ToggleGitBlameInline} |
|
||||
|
||||
> Not all actions have default keybindings, but can be bound by [customizing your keymap](./key-bindings.md#user-keymaps).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue