pub fn migrate_plugin_blocks(workspace: &Path) -> Result<usize>Expand description
Self-heal a workspace whose config.toml still carries the [[plugin]]
tables the 1.2.1 installer appended: merge their ids into the top-level
plugins array, drop the blocks, and rewrite the file atomically. Duplicate
top-level plugins lines merge onto the first line even when no legacy
block remains. Returns the number of folded blocks; 0 means no block was
folded, so an unrelated parse failure keeps reporting its own serde error.
A plugins array this module refuses to edit aborts the fold without
writing, and the loader’s refusal then reaches the operator.