emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add zuul.el package to ELPA


From: Niklas Eklund
Subject: Re: Add zuul.el package to ELPA
Date: Tue, 30 Aug 2022 16:59:13 +0000

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Niklas Eklund [2022-08-29 18:37:26] wrote:
>
>> Hello,
>>
>> I would like to add a package that I have developed named zuul.el,
>> https://git.sr.ht/~niklaseklund/zuul.el, to ELPA.
>
> I can do that, but it requires you change the copyright line to state it
> is owned by the FSF, as usual.  The patch below does that (and a few
> more things which you probably want to double-check).

Absolutely, I will apply that :)

> I notice that the doc says that it doesn't provide any commands other
> than those used from `zuul-log-mode`, then I wonder why these are
> autoloaded, since presumably by the time you can use them
> `zuul-log-mode` is active and hence the package has been loaded.

Thanks for the patch and feedback, the autoloaded commands could indeed
be removed.
>
>         Stefan

/Niklas

> diff --git a/.gitignore b/.gitignore
> index 1d8f1fc7f6..2e852834d1 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -1,2 +1,3 @@
>  /zuul-autoloads.el
> +/zuul-pkg.el
>  *.elc
> diff --git a/README.md b/README.md
> index a84d091e17..f3e83404a5 100644
> --- a/README.md
> +++ b/README.md
> @@ -105,4 +105,4 @@ The `zuul.el` package supports [Connection Local 
> Variables](https://www.gnu.org/
>  
>  # Contributions
>  
> -The author might try to include the package into ELPA in the future, which 
> means that if you want to contribute you must have a copyright assignment.
> +The author might try to include the package into GNU ELPA in the future, 
> which means that if you want to contribute you must have a copyright 
> assignment.
> diff --git a/zuul.el b/zuul.el
> index 178022180f..b7340dc61c 100644
> --- a/zuul.el
> +++ b/zuul.el
> @@ -1,6 +1,6 @@
>  ;;; zuul.el --- Interface to Zuul -*- lexical-binding: t; -*-
>  
> -;; Copyright (C) 2022 Niklas Eklund
> +;; Copyright (C) 2022  Free Software Foundation, Inc.
>  
>  ;; Author: Niklas Eklund <niklas.eklund@posteo.net>
>  ;; URL: https://git.sr.ht/~niklaseklund/zuul.el
> @@ -371,7 +371,6 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>  
>  ;;;; Commands
>  
> -;;;###autoload
>  (defun zuul-switch-build ()
>    "Switch to another build."
>    (interactive)
> @@ -379,7 +378,6 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>      (zuul--open-build-log
>       (zuul--builds zuul--current-build))))
>  
> -;;;###autoload
>  (defun zuul-switch-buildset ()
>    "Switch to a build from a specific buildset."
>    (interactive)
> @@ -387,7 +385,6 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>      (zuul--open-build-log
>       (zuul--buildsets zuul--current-build))))
>  
> -;;;###autoload
>  (defun zuul-open-build-in-browser ()
>    "Open build in browser."
>    (interactive)
> @@ -397,7 +394,6 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>               "/t/" zuul-tenant
>               "/build/" .uuid "/console"))))
>  
> -;;;###autoload
>  (defun zuul-run-build-command ()
>    "Run build command from build log."
>    (interactive)
> @@ -406,7 +402,6 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>          (detached-compile command)
>        (compile command))))
>  
> -;;;###autoload
>  (defun zuul-next-build ()
>    "Switch to next build."
>    (interactive)
> @@ -422,7 +417,6 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>            (cdr (assoc next-index builds-with-index))))
>      (zuul--open-build-log next-build)))
>  
> -;;;###autoload
>  (defun zuul-previous-build ()
>    "Switch to previous build."
>    (interactive)
> @@ -438,7 +432,6 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>            (cdr (assoc previous-index builds-with-index))))
>      (zuul--open-build-log previous-build)))
>  
> -;;;###autoload
>  (defun zuul-quit-build ()
>    "Kill buffers associated with build."
>    (interactive)
> @@ -459,7 +452,6 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>                                      .change)))))
>                   (seq-do #'kill-buffer))))
>  
> -;;;###autoload
>  (defun zuul-previous-command ()
>    "Navigate to previous command."
>    (interactive)
> @@ -468,7 +460,6 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>      (when (re-search-backward re-prompt nil t)
>        (goto-char (match-end 0)))))
>  
> -;;;###autoload
>  (defun zuul-next-command ()
>    "Navigate to next command."
>    (interactive)
> @@ -484,7 +475,7 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>    (with-connection-local-variables
>     (seq-find
>      (lambda (it)
> -      (string= (plist-get it ':name) zuul-tenant))
> +      (string= (plist-get it :name) zuul-tenant))
>      zuul-tenant-configs)))
>  
>  (defun zuul--project-root (project)
> @@ -492,7 +483,7 @@ Optionally provide parameters CHANGE, PROJECT, PATCHSET 
> and LIMIT."
>    (if-let ((tenant-config (zuul--tenant-config))
>             (project-root (cdr
>                            (assoc project
> -                                 (plist-get tenant-config 
> ':project-roots)))))
> +                                 (plist-get tenant-config :project-roots)))))
>        (concat (file-remote-p default-directory) project-root)
>      (message "Project root for %s wasn't found, falling back to 
> `default-directory'" project)
>      default-directory))
> @@ -854,13 +845,13 @@ Optionally provide extra parameters PARAMS, PARSER, 
> METHOD, BUFFER or HEADERS."
>    (let* ((annotations
>            (seq-map (lambda (candidate)
>                       (cl-loop for config in annotation-config
> -                              collect `(,(plist-get config ':name) .
> -                                        ,(funcall (plist-get config 
> ':function) candidate))))
> +                              collect `(,(plist-get config :name) .
> +                                        ,(funcall (plist-get config 
> :function) candidate))))
>                     candidates))
>           (annotation-widths
>            (cl-loop for config in annotation-config
>                     collect
> -                   `(,(plist-get config ':name) .
> +                   `(,(plist-get config :name) .
>                       ,(thread-last annotations
>                                     (seq-map (lambda (it) (length (alist-get 
> (plist-get config :name) it))))
>                                     (funcall (lambda (it)
> @@ -871,17 +862,17 @@ Optionally provide extra parameters PARAMS, PARSER, 
> METHOD, BUFFER or HEADERS."
>                   `(,(cl-loop for config in annotation-config
>                               concat
>                               (let* ((padding 3)
> -                                    (str (alist-get (plist-get config 
> ':name) annotation))
> -                                    (width (alist-get (plist-get config 
> ':name) annotation-widths))
> +                                    (str (alist-get (plist-get config :name) 
> annotation))
> +                                    (width (alist-get (plist-get config 
> :name) annotation-widths))
>                                      (new-str
> -                                     (if-let* ((align (plist-get config 
> ':align))
> +                                     (if-let* ((align (plist-get config 
> :align))
>                                                 (align-right (eq 'right 
> align)))
>                                           (concat (make-string (- width 
> (length str)) ?\s)
>                                                   str (make-string padding 
> ?\s))
>                                         (concat
>                                          (truncate-string-to-width str width 
> 0 ?\s)
>                                          (make-string padding ?\s)))))
> -                               (if-let ((face (plist-get config ':face)))
> +                               (if-let ((face (plist-get config :face)))
>                                     (zuul--propertize-face new-str face)
>                                   new-str)))
>                     . ,candidate))
> @@ -1019,33 +1010,33 @@ Optionally provide extra parameters PARAMS, PARSER, 
> METHOD, BUFFER or HEADERS."
>  
>  (defun zuul--data-playbook-name-str (data)
>    "Return name of playbook in DATA."
> -  (let-alist (plist-get data ':playbook)
> +  (let-alist (plist-get data :playbook)
>      .playbook))
>  
>  (defun zuul--data-playbook-phase-str (data)
>    "Return the phase of playbook in DATA."
> -  (let-alist (plist-get data ':playbook)
> +  (let-alist (plist-get data :playbook)
>      (concat (upcase (substring .phase 0 1))
>              (substring .phase 1))))
>  
>  (defun zuul--data-play-name-str (data)
>    "Return the name of play in DATA."
> -  (let-alist (plist-get data ':play)
> +  (let-alist (plist-get data :play)
>      .play.name))
>  
>  (defun zuul--data-task-name-str (data)
>    "Return the name of task in DATA."
> -  (let-alist (plist-get data ':task)
> +  (let-alist (plist-get data :task)
>      .task.name))
>  
>  (defun zuul--data-task-role-str (data)
>    "Return the role of task in DATA."
> -  (let-alist (plist-get data ':task)
> +  (let-alist (plist-get data :task)
>      (or .role.name "")))
>  
>  (defun zuul--data-task-duration-str (data)
>    "Return the duration of task in DATA."
> -  (let-alist (plist-get data ':task)
> +  (let-alist (plist-get data :task)
>      (let ((duration
>             (float-time
>              (time-subtract
> @@ -1055,12 +1046,12 @@ Optionally provide extra parameters PARAMS, PARSER, 
> METHOD, BUFFER or HEADERS."
>  
>  (defun zuul--data-host-name-str (data)
>    "Return the name of the host in DATA."
> -  (pcase-let* ((`(,hostname . ,_data) (plist-get data ':host)))
> +  (pcase-let* ((`(,hostname . ,_data) (plist-get data :host)))
>      (symbol-name hostname)))
>  
>  (defun zuul--data-host-cmd-str (data)
>    "Return the command of the host in DATA."
> -  (pcase-let* ((`(,_hostname . ,data) (plist-get data ':host))
> +  (pcase-let* ((`(,_hostname . ,data) (plist-get data :host))
>                 (cmd-str (let-alist data .cmd)))
>      (if (stringp cmd-str)
>          cmd-str
> @@ -1068,7 +1059,7 @@ Optionally provide extra parameters PARAMS, PARSER, 
> METHOD, BUFFER or HEADERS."
>  
>  (defun zuul--data-host-result-str (data)
>    "Return the result of the host in DATA."
> -  (pcase-let* ((`(,_hostname . ,data) (plist-get data ':host))
> +  (pcase-let* ((`(,_hostname . ,data) (plist-get data :host))
>                 (result
>                  (let-alist data
>                    (if .failed



reply via email to

[Prev in Thread] Current Thread [Next in Thread]