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

Unnecessary recompilation when switching between cargo check and cargo web deploy #389

Open
Boscop opened this issue Feb 23, 2020 · 0 comments

Comments

@Boscop
Copy link

Boscop commented Feb 23, 2020

Whenever I switch between doing cargo check in Sublime Text and cargo web deploy in cmd.exe, it causes unnecessary recompilation due to this line:

println!( "cargo:rerun-if-env-changed=COMPILING_UNDER_CARGO_WEB" );

I usually have cargo watch -x "web deploy" running (in parallel with browser-sync for auto-reload), this is the output:

[Running 'cargo web deploy']
   Compiling stdweb-internal-runtime v0.1.5
   Compiling stdweb v0.4.20
   Compiling web_logger v0.2.0
   Compiling yew v0.12.0
   Compiling frontend v0.1.0 (D:\projects\myproject\frontend)
    Finished dev [unoptimized + debuginfo] target(s) in 36.72s
    Processing "frontend.wasm"...
    Finished processing of "frontend.wasm"!

It takes ~37 seconds just to recompile after just doing cargo check in the editor, with no source changes! This is very annoying for productivity because it takes away so much accumulated time from the development workflow/cycle!
Can you please only recompile stdweb-internal-runtime when absolutely necessary, i.e. not when doing cargo check?

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

No branches or pull requests

1 participant