mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
extension: Ensure that compiled extension provides at least one feature (#47715)
This PR adds a check during extension compilation to ensure that every compiled extension provides at least one feature, as otherwise, the extension is useless to have. With this in, compiling an extension that does not provide anything will fail. Release Notes: - N/A
This commit is contained in:
parent
e29522a1b7
commit
7cfa0fb876
1 changed files with 6 additions and 2 deletions
|
|
@ -78,6 +78,12 @@ async fn main() -> Result<()> {
|
|||
.await
|
||||
.context("failed to compile extension")?;
|
||||
|
||||
let extension_provides = extension_provides(&manifest);
|
||||
|
||||
if extension_provides.is_empty() {
|
||||
bail!("extension does not provide any features");
|
||||
}
|
||||
|
||||
let grammars = test_grammars(&manifest, &extension_path, &mut wasm_store)?;
|
||||
test_languages(&manifest, &extension_path, &grammars)?;
|
||||
test_themes(&manifest, &extension_path, fs.clone()).await?;
|
||||
|
|
@ -102,8 +108,6 @@ async fn main() -> Result<()> {
|
|||
);
|
||||
}
|
||||
|
||||
let extension_provides = extension_provides(&manifest);
|
||||
|
||||
let manifest_json = serde_json::to_string(&rpc::ExtensionApiManifest {
|
||||
name: manifest.name,
|
||||
version: manifest.version,
|
||||
|
|
|
|||
Loading…
Reference in a new issue