What caused a target to rebuild?

23 views
Skip to first unread message

b...@beautifuldestinations.com

unread,
Oct 11, 2016, 4:04:21 AM10/11/16
to Shake build system
While trying to understand our build system, I've found myself wanting a short (one line) output that gives (one of) the reasons why a target got unexpectedly rebuilt. eg. (.git/HEAD was touched so now I'm rebuilding this massive thing and everything under it).

Deep in the tealeaves of --trace, that information is there, but it is way to verbose to have turned on for every single CI build.

I don't think any of the existing options give what I want. Is there one already?

If not, is there a reason why I shouldn't be able to implement that easily?

--

Neil Mitchell

unread,
Oct 11, 2016, 5:43:55 AM10/11/16
to b...@beautifuldestinations.com, Shake build system
Hi Ben,

Profiling is probably the best way, see http://shakebuild.com/profiling. In particular the HTML reports have a demo/tutorial online which I think answers these questions. It doesn't yet give the "one liner" explaining rebuild reasons, but that is planned (it would be very useful). 

Thanks, Neil 

b...@beautifuldestinations.com

unread,
Oct 18, 2016, 5:20:43 AM10/18/16
to Shake build system, b...@beautifuldestinations.com
In  v0.15.10 Database.hs this message, for b = False, is I think pretty much exactly what I want to have showing. Alas the tides of ongoing master development have swept it away and I haven't seen what (if anything) replaced it.

>                    let out b = diagnostic $ "valid " ++ show b ++ " for " ++ atom k ++ " " ++ atom (result r)

Evan Laforge

unread,
Apr 6, 2018, 5:22:20 PM4/6/18
to b...@beautifuldestinations.com, Shake build system
Was there ever a resolution to this? I'm having the same question.

I looked into report.html, but I can't see anything about why a
certain rule fired. Something like "M.hs: last hash xyz /= current
hash abc".

Would it be ok to bring back that msg, but promote it to noisy level,
so you can see it without diagnostic? I think it's a common question
to have.
Reply all
Reply to author
Forward
0 new messages