feat(doom): add doom.aot option (#1214)

This commit is contained in:
Gideon
2025-11-08 11:03:08 +01:00
committed by GitHub
parent ea1b286c98
commit 28f5754efd
3 changed files with 28 additions and 1 deletions

View File

@@ -391,6 +391,12 @@ pub struct VscodeConfig {
profile: Option<String>,
}
#[derive(Deserialize, Default, Debug, Merge)]
#[serde(deny_unknown_fields)]
pub struct DoomConfig {
aot: Option<bool>,
}
#[derive(Deserialize, Default, Debug, Merge)]
#[serde(deny_unknown_fields)]
pub struct Rustup {
@@ -482,6 +488,9 @@ pub struct ConfigFile {
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
vscode: Option<VscodeConfig>,
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
doom: Option<DoomConfig>,
#[merge(strategy = crate::utils::merge_strategies::inner_merge_opt)]
rustup: Option<Rustup>,
}
@@ -1772,6 +1781,14 @@ impl Config {
Some(profile.as_str())
}
}
pub fn doom_aot(&self) -> bool {
self.config_file
.doom
.as_ref()
.and_then(|doom| doom.aot)
.unwrap_or(false)
}
}
#[cfg(test)]

View File

@@ -65,7 +65,11 @@ impl Emacs {
command.arg("--force");
}
command.args(["upgrade"]);
command.arg("upgrade");
if ctx.config().doom_aot() {
command.arg("--aot");
}
command.status_checked()
}