Electron100 / butane

An ORM for Rust with a focus on simplicity and on writing Rust, not SQL
Apache License 2.0
84 stars 12 forks source link

Fix no-op build perf with build.rs #78

Closed Electron100 closed 1 year ago

Electron100 commented 1 year ago

Running cargo build, followed by a second cargo build should result in the second no-oping and succeeding in a fraction of a second.

build.rs removes the .butane directory, and cargo always treats a non-existent directory as changed. Because this directory is only created when building tests, this behavior leads to what should be a no-op not in fact being so.

We fix this by ensuring we always create the directory.