mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-14 04:43:42 +01:00
refactor(mac): print the macOS view of the schema of komorebi-config
komorebic static-config-schema and the daemon's StaticConfigSchema answer print schema::view::<StaticConfig>(Platform::CURRENT) of the shared crate instead of the schema derived from the daemon's own StaticConfig; the oracle test proves the macOS view equals schema.json byte for byte. Verified: macOS fake-CC cargo check --locked --target aarch64-apple-darwin --workspace --all-targets: finished, 0 errors (tier 2). Not verified: running komorebic or the macOS tests.
This commit is contained in:
1 parent
82ee9dd13a
commit
dec9198492
2 files changed
+8
-5
No files matched your search
@@ -1628,8 +1628,10 @@ impl WindowManager {
|
||||
SocketMessage::StaticConfigSchema => {
|
||||
#[cfg(feature = "schemars")]
|
||||
{
|
||||
let static_config = schemars::schema_for!(StaticConfig);
|
||||
let schema = serde_json::to_string_pretty(&static_config)?;
|
||||
let schema = komorebi_config::schema::view::<
|
||||
komorebi_config::static_config::StaticConfig,
|
||||
>(komorebi_config::schema::Platform::CURRENT);
|
||||
let schema = schema.trim_end();
|
||||
|
||||
reply.write_all(schema.as_bytes())?;
|
||||
}
|
||||
|
||||
@@ -2583,9 +2583,10 @@ exit 1
|
||||
SubCommand::StaticConfigSchema => {
|
||||
#[cfg(feature = "schemars")]
|
||||
{
|
||||
let socket_message = schemars::schema_for!(komorebi_client::StaticConfig);
|
||||
let schema = serde_json::to_string_pretty(&socket_message)?;
|
||||
println!("{schema}");
|
||||
let schema = komorebi_config::schema::view::<
|
||||
komorebi_config::static_config::StaticConfig,
|
||||
>(komorebi_config::schema::Platform::CURRENT);
|
||||
print!("{schema}");
|
||||
}
|
||||
}
|
||||
SubCommand::SubscribeSocket(args) => {
|
||||
|
||||
Reference in new issue
Block a user