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

dx build recompiles everything every time when using a cargo workspace #2326

Open
ochrons opened this issue Apr 17, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working cli Related to the dioxus-cli program fullstack related to the fullstack crate
Milestone

Comments

@ochrons
Copy link

ochrons commented Apr 17, 2024

Problem

When having a Dioxus fullstack app as part of cargo workspace, running dx build always recompiles everything. The same doesn't happen with dx serve though.

Steps To Reproduce

Create a new Rust project using cargo workspace.
Add a Dioxus fullstack project as a workspace member.
Run dx build in the fullstack project dir.
Run it again.

Expected behavior

It should not recompile anything, when nothing is changed.

This problem does not happen when having a standalone Dioxus fullstack or desktop app that is not part of a workspace.

Environment:

  • Dioxus version: 0.5.1 (CLI version 0.5.4)
  • Rust version: 1.76
  • OS info: Win11 WSL2 Ubuntu 22.04
  • App platform: fullstack
@ealmloff ealmloff added cli Related to the dioxus-cli program fullstack related to the fullstack crate labels Apr 18, 2024
@hampuslidin
Copy link
Contributor

I can reproduce this everytime on a non-workspace project as well:

  1. Run dx new.
  2. Select Fullstack.
  3. Give it any project name.
  4. Choose either true or false for using the Dioxus router.
  5. Choose Vanilla CSS.
  6. Go into the project directory.
  7. Run dx build --platform fullstack.
  8. Run dx build --platform fullstack again and observe it being recompiled.

dioxus-cli version: 0.5.4

@jkelleyrtp jkelleyrtp added this to the 0.6.0 milestone Jul 25, 2024
@jkelleyrtp jkelleyrtp added the bug Something isn't working label Jul 31, 2024
@jkelleyrtp jkelleyrtp assigned jkelleyrtp and ealmloff and unassigned jkelleyrtp Aug 1, 2024
@jkelleyrtp
Copy link
Member

This is due to 1) how we handle rustflags for optimizations and 2) where we place out artifacts for parallel builds - this should be mostly fixed when we move to profiles instead of implicit rustargs #2780

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the dioxus-cli program fullstack related to the fullstack crate
Projects
None yet
Development

No branches or pull requests

4 participants