#Compilation time
46 messages · Page 1 of 1 (latest)
Does this happen on every recompile or only on the first compilation?
every recompile
the old one also used to do that
and it just stopped randomly after a while without me changing anything in the toml file
it's a bit hard to say, but it kinda seems like you are doing something that is causing your whole project to compile from scratch everytime
Yea thats what I was thinking too
But it shouldnt do thay
That*
Let me know if you know why it does that. I can't figure it out
could it be that you changed something in cargo.toml when you were debugging this stuff: https://discord.com/channels/691052431525675048/1069516612497055774
have you tried just calling rustc directly and explicitly flagging incremental compilation? might help narrow down where the issue is https://doc.rust-lang.org/cargo/reference/profiles.html#incremental
I don't think I changed anything. I'm gonna experiment with it when I have time.
how do I set the incremental thing to true?
I can't really figure out why this is happening
it just recompiles the whole thing all over again every time I run it
the more crates I add the longer it takes
it got to like 5 mins on my old project before it stopped doing it
have you checked your user-level cargo.toml?
$CARGO_HOME/config.toml which defaults to:
Windows: %USERPROFILE%\.cargo\config.toml
Unix: $HOME/.cargo/config.toml
I think somebody else had a similar issue, are you using RLS or rust-analyzer? What are you using for an IDE?
vs code
rust analyzer
There is no "config.toml"
Have you ran cargo clean? Show your workspace Cargo.toml too
one second
i have not ran cargo clean, this is the toml file:
[package]
name = "game"
version = "0.1.0"
edition = "2021"
[profile.dev]
opt-level = 1
[profile.dev.package."*"]
opt-level = 3
[dependencies]
bevy = { version = "0.9.1", features = ["dynamic"] }
leafwing-input-manager = "0.8.0"
and I'm not sure what you mean by workspace
what does cargo clean do?
cargo clean nukes your build directory so it will be a fresh build. This often fixes this kind of issue for me. By workspace I just mean your project folder. Try adding resolver = 2 under the package section. Then cargo update and cargo clean.
That didn't fix it
can you share a build log? like what your terminal spits out while compiling
Compiling typenum v1.16.0
Compiling taffy v0.1.0
Compiling bevy_ui v0.9.1
Compiling bevy_internal v0.9.1
Compiling bevy_dylib v0.9.1
Compiling bevy v0.9.1
Compiling leafwing-input-manager v0.8.0
Compiling game v0.1.0 (C:\Users\eneva\Desktop\programming\rust\Unpublished\9\game)
Finished dev [optimized + debuginfo] target(s) in 1m 04s
Running target\debug\game.exe
this is a brand new project though its jsut a window and a 2d camera
the more dependencies I add the longer it will get
try cargo run --verbose
So there's a lot of things that could cause this
- is your system time set properly?
- what version of rust are you using?
- disable rust-analyzer, compile from the command line. Does this still occur?
My system time is set properly
I'm using the latest stable version of rust
I'm gonna try that one second
I got the same thing after I disabled the rust analyzer
I literally did absolutely nothing to the toml file and now it takes like 2 seconds to compile
went from 2 mins to 1-2 seconds and I literally did nothing to the toml file
Gotta love when that happens. Glad to hear you got it resolved