Skip to content

Commit b7e2cae

Browse files
Fix: don't include inferred properties in the serialized recipe
1 parent 135f3ac commit b7e2cae

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/skeleton/read.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ pub(super) fn manifests<P: AsRef<Path>>(
6767
let contents = fs::read_to_string(&absolute_path)?;
6868

6969
let mut parsed = cargo_manifest::Manifest::from_str(&contents)?;
70+
// The completions are relevant for our analysis, but we shouldn't
71+
// include them in the final output.
72+
let before_completions = toml::Value::try_from(&parsed)?;
73+
7074
// Required to detect bin/libs when the related section is omitted from the manifest
7175
parsed.complete_from_path(&absolute_path)?;
7276

@@ -103,7 +107,7 @@ pub(super) fn manifests<P: AsRef<Path>>(
103107

104108
manifests.push(ParsedManifest {
105109
relative_path,
106-
contents: intermediate,
110+
contents: before_completions,
107111
targets: targets.into_iter().collect(),
108112
});
109113
}

0 commit comments

Comments
 (0)