Repository navigation
vergen: idempotent builds from CI only, I guess? - #1225
Conversation
see the diff; it turns out that setting .idempotent() omits setting `rerun-if-changed=.git/HEAD`. then if you: * building Propolis at A (fresh or otherwise with no cached builds), * check out a different commit B, * build again without `cargo clean` or causing `propolis` to rebuild you end up with propolis-server and propolis-standalone binaries reporting they were built at commit A while containing code that quite definitely is from B. this should fix getting accurate commit data when you're making development builds from moving around in git, but keep things more determinsitic in CI.
|
there's another bug that I'm going to push another commit here for in a second: if your working tree was clean and became dirty without touching the fix for that will be moving the vergen instructions around a bit so that git-tree-is-dirty comes from the bin crates where the rest comes from propolis-lib. since they're all built out of the same directory, at least centralizing the git commit state works reasonably.. |
3e92efa to
7d27ecc
Compare
hawkw
left a comment
There was a problem hiding this comment.
this all makes sense to me; the rerun-if-changed sucks but there is really no good solution for it, so I think this is the least bad solution!
| // *much* faster to build than any of the bins being linked afterwards! | ||
| // | ||
| // This also means we can keep all of the versioning fiddliness here instead | ||
| // of subjecting every (e.g. both) user to thinking about this stuff. |
There was a problem hiding this comment.
every (e.g. both)
okay, this bit got me, good show!
see the diff; it turns out that setting .idempotent() omits setting
rerun-if-changed=.git/HEAD. then if you:cargo cleanor causingpropolisto rebuildyou end up with propolis-server and propolis-standalone binaries reporting they were built at commit A while containing code that quite definitely is from B.
this should fix getting accurate commit data when you're making development builds from moving around in git, but keep things more determinsitic in CI.