Subject: [bug#59078] [PATCH] lint: Split the derivation lint checker by system.

From: Christopher Baines <[email-masked]>
Date: Mon, 07 Nov 2022 18:37:32 +0100

Christopher Baines <[email-masked]> writes:

> This problem also impacts the Guix Data Service, since it tries to run the
> derivation checker for all packages.

This patch has now been processed by qa.guix.gnu.org. Looking at the
logs for the Guix Data Service processing the base and target revision,
and the change is more significant than I'd imagined:

Base:

  inferior heap after cleanup: 1739.0 MiB used (5160.0 MiB heap)
  debug: Finished getting formatting lint warnings, took 349 seconds
  debug: Finished fetching inferior lint warnings, took 3782 seconds

Target:

  inferior heap after cleanup: 1152.0 MiB used (1778.0 MiB heap)
  debug: Finished getting derivation/aarch64-linux lint warnings, took 334 seconds
  debug: Finished fetching inferior lint warnings, took 3285 seconds

So with the changes, it's a little faster, but the main difference is
that the heap ~3GiB smaller, so ~34% of what it was previously.

I did notice that this also subtly differs from how the linter behaved
previously, since some packages define support for systems not defined
through the platform module.

  https://data.qa.guix.gnu.org/compare?base_commit=a60dc46c2bb5de196858594b72b00d5f86ca7e98&target_commit=4e152714f55337015991e62e51e8dea15e889b9f

Personally, I think this change is still a good one. Maybe we can add a
separate linter to go round and check that packages don't declare
support for systems that aren't in the platform module.

Unless anyone objects, I'll like to push this sooner rather than later,
as I think the excessive heap size in the inferior process is not ideal.

Thanks,

Chris