This usually isn't a problem, but can be annoying if you're editing files in the middle of deploying a build. Even if it's just editing comments, the second "build" triggered will rebuild everything.
I believe this is due to us running cargo web build, which in turn builds all library and binary targets. It first builds the library defined in lib.rs, then the binary in main.rs - while we only really actually care about the binary, because that's what we're going to deploy.
An example of the output showing the two builds if I make changes during the first one:
I believe changes are needed in cargo-web to fix this best. If they add a --bins flag, and we implement #14, then it would be possible to have cargo screeps deploy run the equivalent of cargo screeps build --bins, rather than cargo screeps build.
This usually isn't a problem, but can be annoying if you're editing files in the middle of deploying a build. Even if it's just editing comments, the second "build" triggered will rebuild everything.
I believe this is due to us running
cargo web build
, which in turn builds all library and binary targets. It first builds the library defined inlib.rs
, then the binary inmain.rs
- while we only really actually care about the binary, because that's what we're going to deploy.An example of the output showing the two builds if I make changes during the first one:
I believe changes are needed in cargo-web to fix this best. If they add a
--bins
flag, and we implement #14, then it would be possible to havecargo screeps deploy
run the equivalent ofcargo screeps build --bins
, rather thancargo screeps build
.