[major] Migrate to diagnostics