2 Revize 0b8f751243 ... 5b65938f77

Autor SHA1 Zpráva Datum
  Alex Kost 5b65938f77 scheme/actions: Updates for a recent API change před 4 roky
  Alex Kost 9faebb7b07 elisp/devel: Update font-lock and indent symbols před 4 roky
2 změnil soubory, kde provedl 74 přidání a 33 odebrání
  1. 50 13
      elisp/guix-devel.el
  2. 24 20
      scheme/emacs-guix/actions.scm

+ 50 - 13
elisp/guix-devel.el

@@ -1,6 +1,6 @@
 ;;; guix-devel.el --- Development tools  -*- lexical-binding: t -*-
 
-;; Copyright © 2015–2018 Alex Kost <alezost@gmail.com>
+;; Copyright © 2015–2018, 2020 Alex Kost <alezost@gmail.com>
 ;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
 ;; Copyright © 2020 Maxim Cournoyer
 
@@ -194,16 +194,24 @@ to find 'modify-phases' keywords."
       (save-excursion (up-list) (point)))))
 
 (defconst guix-devel-keywords
-  '("call-with-compressed-output-port"
-    "call-with-container"
-    "call-with-decompressed-port"
-    "call-with-derivation-narinfo"
-    "call-with-derivation-substitute"
-    "call-with-error-handling"
-    "call-with-gzip-input-port"
-    "call-with-gzip-output-port"
-    "call-with-temporary-directory"
-    "call-with-temporary-output-file"
+  '(;; The `call-…' symbols are procedures, not macros, so they probably
+    ;; should not be highlighted.
+    ;;
+    ;; "call-with-compressed-output-port"
+    ;; "call-with-container"
+    ;; "call-with-decompressed-port"
+    ;; "call-with-derivation-narinfo"
+    ;; "call-with-derivation-substitute"
+    ;; "call-with-error-handling"
+    ;; "call-with-gzip-input-port"
+    ;; "call-with-gzip-output-port"
+    ;; "call-with-lzip-intput-port"
+    ;; "call-with-lzip-output-port"
+    ;; "call-with-progress-reporter"
+    ;; "call-with-prompt"
+    ;; "call-with-temporary-directory"
+    ;; "call-with-temporary-output-file"
+    ;; "call-with-transaction"
     "define-enumerate-type"
     "define-gexp-compiler"
     "define-lift"
@@ -231,12 +239,23 @@ to find 'modify-phases' keywords."
     "use-system-modules"
     "with-atomic-file-output"
     "with-atomic-file-replacement"
+    "with-build-handler"
+    "with-database"
     "with-derivation-narinfo"
     "with-derivation-substitute"
     "with-directory-excursion"
     "with-error-handling"
+    "with-extensions"
+    "with-external-store"
+    "with-file-lock"
+    "with-file-lock/no-wait"
     "with-imported-modules"
     "with-monad"
+    "with-parameters"
+    "with-profile-lock"
+    "with-status-report"
+    "with-status-verbosity"
+    "with-temporary-git-repository"
     "with-mutex"
     "with-store"))
 
@@ -294,15 +313,21 @@ Each rule should have a form (SYMBOL VALUE).  See `put' for details."
   (build-system 0)
   (call-with-compressed-output-port 2)
   (call-with-container 1)
-  (call-with-gzip-input-port 1)
-  (call-with-gzip-output-port 1)
   (call-with-decompressed-port 2)
   (call-with-error-handling 0)
+  (call-with-gzip-input-port 1)
+  (call-with-gzip-output-port 1)
+  (call-with-lzip-input-port 1)
+  (call-with-lzip-output-port 1)
+  (call-with-progress-reporter 1)
+  (call-with-prompt 1)
+  (call-with-transaction 1)
   (container-excursion 1)
   (emacs-batch-edit-file 1)
   (emacs-batch-eval 0)
   (emacs-substitute-sexps 1)
   (emacs-substitute-variables 1)
+  (eventually 1)
   (file-system 0)
   (graft 0)
   (manifest-entry 0)
@@ -324,16 +349,28 @@ Each rule should have a form (SYMBOL VALUE).  See `put' for details."
   (signature-case 1)
   (substitute* 1)
   (substitute-keyword-arguments 1)
+  (syntax-parameterize 1)
   (test-assertm 1)
   (with-atomic-file-output 1)
+  (with-build-handler 1)
+  (with-database 2)
   (with-derivation-narinfo 1)
   (with-derivation-substitute 2)
   (with-directory-excursion 1)
   (with-error-handling 0)
+  (with-extensions 1)
+  (with-external-store 1)
+  (with-file-lock 1)
+  (with-file-lock/no-wait 1)
   (with-imported-modules 1)
   (with-monad 1)
   (with-mutex 1)
+  (with-parameters 1)
+  (with-profile-lock 1)
+  (with-status-report 1)
+  (with-status-verbosity 1)
   (with-store 1)
+  (with-temporary-git-repository 1)
   (wrap-program 1)
 
   ;; 'modify-phases' keywords:

+ 24 - 20
scheme/emacs-guix/actions.scm

@@ -1,6 +1,6 @@
 ;;; actions.scm --- Various store actions on packages and generations
 
-;; Copyright © 2014-2016 Alex Kost <alezost@gmail.com>
+;; Copyright © 2014–2016, 2020 Alex Kost <alezost@gmail.com>
 
 ;; This file is part of Emacs-Guix.
 
@@ -116,14 +116,15 @@ OUTPUTS is a list of package outputs (may be an empty list)."
     (unless (and (null? install) (null? remove))
       (parameterize ((%graft? (not dry-run?)))
         (with-store store
-          (set-build-options store
-                             #:print-build-trace #f
-                             #:use-substitutes? use-substitutes?)
-          (show-manifest-transaction store manifest transaction
-                                     #:dry-run? dry-run?)
-          (build-and-use-profile store profile new-manifest
-                                 #:use-substitutes? use-substitutes?
-                                 #:dry-run? dry-run?))))))
+          (with-build-handler (build-notifier
+                               #:use-substitutes? use-substitutes?
+                               #:dry-run? dry-run?)
+            (set-build-options store
+                               #:print-build-trace #f
+                               #:use-substitutes? use-substitutes?)
+            (show-manifest-transaction store manifest transaction
+                                       #:dry-run? dry-run?)
+            (build-and-use-profile store profile new-manifest)))))))
 
 (define (build-package* package . build-options)
   "Build PACKAGE using BUILD-OPTIONS acceptable by 'set-build-options'.
@@ -173,17 +174,20 @@ GENERATIONS is a list of generation numbers."
     (with-store store
       (let* ((derivation  (package-source-derivation store source))
              (derivations (list derivation)))
-        (set-build-options store
-                           #:print-build-trace #f
-                           #:use-substitutes? use-substitutes?)
-        (show-what-to-build store derivations
-                            #:use-substitutes? use-substitutes?
-                            #:dry-run? dry-run?)
-        (unless dry-run?
-          (build-derivations store derivations))
-        (format #t "The source store file name: ~a~%"
-                (package-source-derivation->store-file-name
-                 derivation))))))
+        (with-build-handler (build-notifier
+                             #:use-substitutes? use-substitutes?
+                             #:dry-run? dry-run?)
+          (set-build-options store
+                             #:print-build-trace #f
+                             #:use-substitutes? use-substitutes?)
+          (show-what-to-build store derivations
+                              #:use-substitutes? use-substitutes?
+                              #:dry-run? dry-run?)
+          (unless dry-run?
+            (build-derivations store derivations))
+          (format #t "The source store file name: ~a~%"
+                  (package-source-derivation->store-file-name
+                   derivation)))))))
 
 (define (package-build-log-file package-id)
   "Return the build log file of a package PACKAGE-ID.