Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(feature/specta): Resolve error when using latest version of specta with tauri specta feature #11871

Merged

Conversation

johncarmack1984
Copy link
Contributor

Presently, when running tauri dev with the specta feature enabled, the terminal shows this error:

error[E0433]: failed to resolve: use of undeclared crate or module `specta_util`
   --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.1.1/src/plugin.rs:911:39
    |
911 | #[cfg_attr(feature = "specta", derive(specta::Type))]
    |                                       ^^^^^^^^^^^^ use of undeclared crate or module `specta_util`
    |
    = note: this error originates in the derive macro `specta::Type` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared crate or module `specta_util`
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.1.1/src/ipc/channel.rs:47:12
   |
47 |   #[derive(specta::Type)]
   |            ^^^^^^^^^^^^ use of undeclared crate or module `specta_util`
   |
   = note: this error originates in the derive macro `specta::Type` (in Nightly builds, run with -Z macro-backtrace for more info)

By upgrading to the latest specta version and adding the specta-util package to the feature, functionality is restored to expected behavior.

Notes:

  • cargo test has the same outcome on this branch as it does on dev branch (1 failed)
  • Same for cargo clippy (1 warning)

Let me know if anything else is needed!

@johncarmack1984 johncarmack1984 requested a review from a team as a code owner December 4, 2024 18:29
Copy link
Contributor

github-actions bot commented Dec 4, 2024

Package Changes Through 163ea7b

There are 8 changes which include @tauri-apps/api with minor, tauri-bundler with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.1.1 2.2.0
tauri-utils 2.1.0 2.1.1
tauri-bundler 2.1.0 2.2.0
tauri-runtime 2.2.0 2.3.0
tauri-runtime-wry 2.2.0 2.3.0
tauri-codegen 2.0.3 2.0.4
tauri-macros 2.0.3 2.0.4
tauri-plugin 2.0.3 2.0.4
tauri-build 2.0.3 2.0.4
tauri 2.1.1 2.2.0
@tauri-apps/cli 2.1.0 2.2.0
tauri-cli 2.1.0 2.2.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@johncarmack1984
Copy link
Contributor Author

Per @FabianLars via #11872, requesting that whoever reviews this PR might ignore the failing lint, since the fix for the lint is present in #11694

@lucasfernog
Copy link
Member

note that the specta_util explicit reference was removed recently
https://github.com/specta-rs/specta/pull/294/files#diff-3014e445edf11c74bdfdb0601494abf5d22f01c14214d203b86768d00dda2d36L42
so when specta releases its next version, we'll be able to remove the specta_util dependency

lucasfernog
lucasfernog previously approved these changes Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants