Open thewh1teagle opened 2 months ago
Could you share your project structure? generally tauri tries to reload only on relevant files changes but you can choose files to ignore by adding a .taurignore
(works similar to .gitignore
) file in your project.
Could you share your project structure? generally tauri tries to reload only on relevant files changes but you can choose files to ignore by adding a
.taurignore
(works similar to.gitignore
) file in your project.
I mean not just that it reload but that it's recompile a lot of crates. The project is here
Could you list which crates gets recompiled? also has this been an issue since v2 or just in the latest release?
Could you list which crates gets recompiled? also has this been an issue since v2 or just in the latest release?
Before Saving file with cargo build (Good)
cargo build
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /Volumes/Internal/vibe/vibe/core/Cargo.toml
workspace: /Volumes/Internal/vibe/vibe/Cargo.toml
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.85s
After saving file with cargo build (Good)
cargo build
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package: /Volumes/Internal/vibe/vibe/core/Cargo.toml
workspace: /Volumes/Internal/vibe/vibe/Cargo.toml
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.29s
With tauri cli after save file
Note: I mention saving file because that's basically what I do. Most probably it's because rust analyzer triggered. Without saving the files it doesn't recompile the crates on reload.
Verbose
Same on Windows and macOS
A workaround is to use another target directory with tauri dev --target <your target>
.
The issue seems to be related to rust-analayzer. If I stopped rust-analyzer, reloading or running tauri dev
again, doesn't re-compile. I don't have a solution atm unfortunately. I am not even sure if it is a bug on our side or in rust-analyzer.
I am not even sure if it is a bug on our side or in rust-analyzer.
I ran into similar issues in the past, usually it's a single dependency that has to re-compile. Here it seems to be ring
. I assume it's due to a different environment triggering a rebuild-if-env-changed
.
I ran into the issue with ring
specifically just a few weeks ago too in another project. So to fix this issue with tauri
, either ring
has to be replaced as a sub-dependency (e.g. with openssl
), or ring
has to be fixed.
@Systemcluster How did you track down the problematic dependency? The first one in the list?
It's usually always the first dependency that recompiles.
I solved it by removing the dependency that depended on it (and just used ureq
with native-tls
instead of rustls
with ring
) when I ran into it here: https://github.com/Systemcluster/sentencepiece-model/commit/8948b3c2db44b0dd94290f9e2ffe63441df22f47
I didn't look into ring
any further than that.
In https://github.com/tauri-apps/tauri/pull/11098, I have tried moving the tls
features activation from CLI into build.rs
script hoping that it would fix this issue but no avail unfortunately.
I should note that on Windows, instead of ring
, it rebuilds vswhom-sys
Describe the bug
Every time I save file cargo check invoked from rust analyzer. then tauri trigger reload and recompile. However it recompile a lot of crates each time I save which takes a lot of time. maybe it has conflict with rust analyzer. It's affect the development and it's hard to develop when each time I save file it recompile for a minute.
Reproduction
bunx tauri dev
in v2 project in vscode in macos with rust analyzer.Expected behavior
If I didn't changed anything, it shouldn't rebuild anything.
Full
tauri info
outputStack trace
Additional context
No response