Skip to content

Add check for unused imports to CI

Motivation

Unused imports mean extra file reads for the compilation of individual files and extra unnecessary dependencies for the build system. Removing them would shorten compile times, hopefully increase parallelism in the build system, and reduce rebuilding (if an unused import to a file changes, that file will be rebuilt, despite the import not actually affecting the file).

There already exist many examples and more can potentially be introduced with code changes. Therefore we should check for unused imports in the CI pipeline, but not before removing all instances in the code base so new CI jobs don't fail because of old unused imports.

Proposal

  1. Remove all unused imports from GHC
  2. Introduce a check for unused imports to the CI pipeline
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information