(zilch lang ninja build): don't generate empty derivation names

This commit is contained in:
puck 2025-05-01 13:20:05 +00:00
parent 559350369c
commit 95e7ca1277

View file

@ -36,7 +36,9 @@
;; Helper to render nicer derivation names.
(define (make-valid-store-path-string str)
(string-map (lambda (c) (if (is-valid-store-path-char c) c #\-)) (if (> (string-length str) 211) (string-copy str 0 211) str)))
(if (string=? "" str)
"zilch-ninja"
(string-map (lambda (c) (if (is-valid-store-path-char c) c #\-)) (if (> (string-length str) 211) (string-copy str 0 211) str))))
(define (derivation-for-edge environment vfs relative-to-root edges current-edge)