diff options
| author | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-21 12:16:38 +0000 |
|---|---|---|
| committer | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-21 12:16:38 +0000 |
| commit | 5b68da6479da03e9bf7f00ae3094561349980aa7 (patch) | |
| tree | 64338cd9de23fc329f4b94ccf99f3d0414f93ef0 | |
| parent | 3a526efb4cd3721adadf17cbf4a8dc1c5cbd8dec (diff) | |
| download | genenetwork4-5b68da6479da03e9bf7f00ae3094561349980aa7.tar.gz | |
guix: the source is the checkout minus its runtime artifacts
`local-file` excluded only /target/, so the build's source hash included ai-memory.sqlite (1.9 MB, rewritten on every memory sync), its xapian index, and the __pycache__ directories. Two consequences, both measured today: a store path could never match a commit's -- syncing memory changed the derivation with no code change -- and every rebuild was a full ~9-minute recompile of the crate and its vendored dependencies rather than a no-op. The select? now follows .gitignore: /target/, __pycache__, ai-memory.sqlite (and its journals and index), *.swp, and the generated gemma-loco.cwl. Those are all things the checkout produces, none of which the binary needs. Not included, deliberately: tokens.sqlite (a secret store the build never reads) and the compiled .cwl (regenerated on every call).
| -rw-r--r-- | guix.scm | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/guix.scm b/guix.scm index c5067d4..f14142c 100644 --- a/guix.scm +++ b/guix.scm @@ -76,9 +76,21 @@ (package (name "genenetwork4-git") (version "0.1.0") + ;; The exclusion list is the .gitignore, minus the two entries that must + ;; stay in the build (tokens.sqlite is a secret the build never sees, and + ;; the *.cwl is regenerated): everything else there is a runtime artifact, + ;; and ai-memory.sqlite is the one that used to matter -- it is 1.9 MB and + ;; rewritten on every memory sync, so the source hash (and the whole + ;; ~9-minute recompile) changed without a line of code changing, and a + ;; store path could never match a commit's. (source (local-file %source-dir #:recursive? #t - #:select? (lambda (file stat) - (not (string-contains file "/target/"))))) + #:select? + (lambda (file stat) + (not (or (string-contains file "/target/") + (string-contains file "__pycache__") + (string-contains file "/ai-memory.sqlite") + (string-suffix? ".swp" file) + (string-suffix? "/gemma-loco.cwl" file)))))) (build-system cargo-build-system) ;; The xapian-rs git dependency (the native search engine's ;; bindings) needs the vendored-graph build to deviate from the |
