Archived
1
0
Fork 0

Revert "self: Build gnu/packages/*.go in 26 steps."

This reverts commit 5898b2e8a3, which led
to Guix where many .go files would be missing, as reported in
<https://issues.guix.gnu.org/65456>.
This commit is contained in:
Ludovic Courtès 2023-08-22 23:46:05 +02:00
parent db02fcde38
commit f4d0d0bd5e
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1,7 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017-2023 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net> ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -1211,12 +1210,9 @@ containing MODULE-FILES and possibly other files as well."
'((guix build compile) '((guix build compile)
(guix build utils))) (guix build utils)))
#~(begin #~(begin
(use-modules (srfi srfi-1) (use-modules (srfi srfi-26)
(srfi srfi-26)
(srfi srfi-71)
(ice-9 match) (ice-9 match)
(ice-9 format) (ice-9 format)
(ice-9 regex)
(ice-9 threads) (ice-9 threads)
(guix build compile) (guix build compile)
(guix build utils)) (guix build utils))
@ -1248,27 +1244,12 @@ containing MODULE-FILES and possibly other files as well."
(force-output)) (force-output))
(define (process-directory directory files output) (define (process-directory directory files output)
;; Split gnu/packages in 26 chunks to avoid OOM errors ;; Hide compilation warnings.
(let* ((chunks (map (compose (parameterize ((current-warning-port (%make-void-port "w")))
(cute partition <> files) (compile-files directory #$output files
(lambda (regex) #:workers (parallel-job-count)
(cute string-match regex <>)) #:report-load report-load
(cute string-append "^gnu/packages/" <>) #:report-compilation report-compilation)))
(cute make-string 1 <>)
integer->char
(cute + (char->integer #\a) <>))
(iota 26)))
(chunks (filter pair? chunks)))
(for-each
(lambda (chunck)
;; Hide compilation warnings.
(parameterize ((current-warning-port (%make-void-port "w")))
(compile-files directory #$output chunck
#:workers (parallel-job-count)
#:report-load report-load
#:report-compilation report-compilation))
(gc))
chunks)))
(setvbuf (current-output-port) 'line) (setvbuf (current-output-port) 'line)
(setvbuf (current-error-port) 'line) (setvbuf (current-error-port) 'line)