-
Notifications
You must be signed in to change notification settings - Fork 267
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
Alternating cargo build / trunk build leads to full build #156
Comments
Hello @iulianR, the issue is probably simply that trunk forces the compilation target In short, create a dir next to your Cargo.toml for the wasm project called [build]
target = "wasm32-unknown-unknown" |
Hmm, but this means that the server will be built for
I can maybe prepare an example, to make it more clear. |
@iulianR I understand, which is why I said |
My apologies, I missed that detail. I went on and made the change, but the same thing is happening as far as I can see: I also don't have anything else running that would affect the build (such as rust-analyzer running |
So, in reality, regardless of whether the targets are different, the only thing that would actually cause a full build to be triggered again is if the cached build artifacts in Is anything doing a |
Per my last comment here, it would seem that there was something else at play. Any updates on your end @iulianR? |
There is no |
I think I might have found the culprit. It is caused by the fact that I am using using
Regardless, I prepared this example: And I was alternating between these commands (rebuild every time):
It just happens that I noticed that no rebuilds are triggered if I have I guess it is not really a Thanks for your help! Feel free to close/rename/move this issue. |
Glad you were able to resolve the issue. |
Just ran into the same issue (because I have set mold as my linker via [build]
target = "wasm32-unknown-unknown" in the project's |
Hello! Should a full build be done every time if I alternate between
cargo build
andtrunk build
? I can understand if they are incremental builds because I am basically building for different targets, but I don't see why these are always started from scratch. You can see the problem here, where I try to compile the seed example in this repo:https://asciinema.org/a/wzaeItOsJBZZSlFw8xFHbYjVK
This is causing me a problem in a project where I have a workspace with two members, a server (that I compile with
cargo -p server
) and a Seed-based app (where I usetrunk build
). It basically makes incremental compilation impossible if I modify both the server and the Seed app.I can provide more info, thanks!
The text was updated successfully, but these errors were encountered: