Skip to content

Commit 023080c

Browse files
authored
add a generated comment to spin-dependencies.wit (#3515)
Signed-off-by: Karthik Ganeshram <kganeshr@akamai.com>
1 parent cdbf33a commit 023080c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • crates/dependency-wit/src

crates/dependency-wit/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ use spin_serde::DependencyName;
77
use wit_component::DecodedWasm;
88
use wit_parser::Span;
99

10+
const GENERATED_COMMENT: &str = "// This file is automatically generated by Spin\n// It is not intended for manual editing.\n\n";
11+
1012
pub async fn extract_wits_into(
1113
source: impl ExactSizeIterator<Item = (&DependencyName, &ComponentDependency)>,
1214
app_root: impl AsRef<Path>,
@@ -19,7 +21,11 @@ pub async fn extract_wits_into(
1921
return Ok(());
2022
}
2123

22-
let wit_text = extract_wits(source, app_root).await?;
24+
let wit_text = format!(
25+
"{}{}",
26+
GENERATED_COMMENT,
27+
extract_wits(source, app_root).await?
28+
);
2329

2430
tokio::fs::create_dir_all(
2531
dest_file

0 commit comments

Comments
 (0)