Wire compilation events to be fired.

Review by @dotta