Skip to content

Commit

Permalink
fully qualify SpiError, task_net_api::{SendError, RecvError} type…
Browse files Browse the repository at this point in the history
…s in Idol (#1689)
  • Loading branch information
hawkw committed Mar 29, 2024
1 parent bbe852f commit ad28904
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions drv/spi-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#![no_std]

// For Idol-generated code that fully qualifies error type names.
use crate as drv_spi_api;
use derive_idol_err::IdolError;
use gateway_messages::SpiError as GwSpiError;
use hubpack::SerializedSize;
Expand Down
4 changes: 2 additions & 2 deletions idl/net.idol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Interface(
},
reply: Result(
ok: "UdpMetadata",
err: CLike("RecvError"),
err: CLike("task_net_api::RecvError"),
),
),
"send_packet": (
Expand All @@ -30,7 +30,7 @@ Interface(
},
reply: Result(
ok: "()",
err: CLike("SendError"),
err: CLike("task_net_api::SendError"),
),
),
"smi_read": (
Expand Down
6 changes: 3 additions & 3 deletions idl/spi.idol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Interface(
},
reply: Result(
ok: "()",
err: CLike("SpiError"),
err: CLike("drv_spi_api::SpiError"),
),
),
"write": (
Expand All @@ -27,7 +27,7 @@ Interface(
},
reply: Result(
ok: "()",
err: CLike("SpiError"),
err: CLike("drv_spi_api::SpiError"),
),
),
"exchange": (
Expand All @@ -41,7 +41,7 @@ Interface(
},
reply: Result(
ok: "()",
err: CLike("SpiError"),
err: CLike("drv_spi_api::SpiError"),
),
),
"lock": (
Expand Down
2 changes: 2 additions & 0 deletions task/net-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#![no_std]

// For Idol-generated code that fully qualifies error type names.
use crate as task_net_api;
use derive_idol_err::IdolError;
use hubpack::SerializedSize;
use serde::{Deserialize, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion task/net/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ mod idl {
use task_net_api::{
KszError, KszMacTableEntry, LargePayloadBehavior, MacAddress,
MacAddressBlock, ManagementCounters, ManagementLinkStatus, MgmtError,
PhyError, RecvError, SendError, SocketName, UdpMetadata,
PhyError, SocketName, UdpMetadata,
};
include!(concat!(env!("OUT_DIR"), "/server_stub.rs"));
}
Expand Down

0 comments on commit ad28904

Please sign in to comment.