Skip to content

Commit aa758a8

Browse files
authored
refactor(core): delete the command module (#8716)
1 parent 9eaeb5a commit aa758a8

23 files changed

Lines changed: 1214 additions & 1220 deletions

File tree

.changes/move-command-module.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch:breaking
3+
---
4+
5+
Moved the `command` module items to the `ipc` module so its import name does not clash with the `command` macro.

core/tauri-macros/src/command/wrapper.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ pub fn wrapper(attributes: TokenStream, item: TokenStream) -> TokenStream {
264264
// double braces because the item is expected to be a block expression
265265
($path:path, $invoke:ident) => {{
266266
#[allow(unused_imports)]
267-
use #root::command::private::*;
267+
use #root::ipc::private::*;
268268
// prevent warnings when the body is a `compile_error!` or if the command has no arguments
269269
#[allow(unused_variables)]
270270
let #root::ipc::Invoke { message: #message, resolver: #resolver, acl: #acl } = $invoke;
@@ -442,8 +442,8 @@ fn parse_arg(
442442

443443
let root = &attributes.root;
444444

445-
Ok(quote!(#root::command::CommandArg::from_command(
446-
#root::command::CommandItem {
445+
Ok(quote!(#root::ipc::CommandArg::from_command(
446+
#root::ipc::CommandItem {
447447
plugin: #plugin_name,
448448
name: stringify!(#command),
449449
key: #key,

0 commit comments

Comments
 (0)