Suggestion: setup regular CI builds for your crates

There is a common pattern when writing CI pipelines for Rust to test against stable, beta and nightly. The latter two give you advanced warning of changes to Rust that will break your crate. In my experience, this has been very useful at warning me of new warnings.

This is all well and good, until the point at which your crate reaches maturity, and few/no new features/fixes are being contributed. If your CI pipeline is only triggered when someone commits or opens a PR, the pipeline may then only be run irregularly.

This has just happened to error-chain, where a new warning in nightly was apparently first detected by users of the crate. It turned out that the error-chain travis pipeline had not been run in months. I've also just turned on weekly builds for a crate I control, and discovered a new clippy failure.

Therefore, if you own a crate, I would strongly recommend turning on your CI platform's option to trigger regular builds. On travis, this is 'cron jobs', accessible from the setting page. This should help your CI system warn you of breakages before your users do.

9 Likes

Absolutely, 'trust but verify'. Even when you think nothing has changed, things change (system clocks move onwards if nothing else!).

Always force a build at the weekend - ideally a really clean build.

Good point about clients; I don't write enough macros to think of that case. This is also important to not frustrate contributors.

For "posterity"'s sake, this suggestion has been recorded in my CI documentation. I've opened an issue to add the macro justification to it.

1 Like