melpa / package-build

Tools for assembling a package archive

Home Page:https://github.com/melpa/melpa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`(package-build-all)` prints a `wrong-type-argument stringp`

ramboman opened this issue · comments

I am learning to use package-build to create a personal local melpa containing
only my own packages. In the following simple case, (package-build-all) prints
a "wrong-type-argument stringp" error:

Here is the structure of my personal melpa directory:

<personal-melpa-dir>
 |- archive
 |   \- (empty)
 |- recipes
 |   \- smex
 \- working
     \- (empty)

recipes/smex:

(smex :repo "nonsequitur/smex" :fetcher github)

test.el

#!emacs --script

(add-to-list 'load-path "<package-build-git-repo-dir>")

(require 'package-build)

(setq local-melpa-dir "<personal-melpa-dir>")
(setq package-build-archive-dir (expand-file-name "archive" local-melpa-dir))
(setq package-build-recipes-dir (expand-file-name "recipes" local-melpa-dir))
(setq package-build-working-dir (expand-file-name "working" local-melpa-dir))

(package-build-archive)

When executing (package-build-archive), I expect that it builds smex and put
it in the archive directory.

Instead, the following message is printed:

Error: (wrong-type-argument stringp #s(#s(eieio--class package-github-recipe nil (#s(eieio--class package-git-recipe nil (#s(eieio--class package-recipe nil nil [#s(cl-slot-descriptor name nil t nil) #s(cl-slot-descriptor url nil t nil) #s(cl-slot-descriptor repo nil t nil) #s(cl-slot-descriptor repopage nil t nil) #s(cl-slot-descriptor files nil t nil) #s(cl-slot-descriptor branch nil t nil) #s(cl-slot-descriptor commit nil t nil) #s(cl-slot-descriptor version-regexp nil t nil) #s(cl-slot-descriptor old-names nil t nil)] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8125 data (name 0 url 1 repo 2 repopage 3 files 4 branch 5 commit 6 version-regexp 7 old-names 8)) (package-hg-recipe package-git-recipe) ((:name . name) (:url . url) (:repo . repo) (:repopage . repopage) (:files . files) (:branch . branch) (:commit . commit) (:version-regexp . version-regexp) (:old-names . old-names)) [#s(cl-slot-descriptor stable-p nil t nil) #s(cl-slot-descriptor tag-regexp nil t nil) #s(cl-slot-descriptor repopage-format nil t nil) #s(cl-slot-descriptor url-format nil t nil)] [nil nil nil nil] #s(#6 nil nil nil nil nil nil nil nil nil) (:custom-groups nil :abstract t))) [#s(cl-slot-descriptor name nil t nil) #s(cl-slot-descriptor url nil t nil) #s(cl-slot-descriptor repo nil t nil) #s(cl-slot-descriptor repopage nil t nil) #s(cl-slot-descriptor files nil t nil) #s(cl-slot-descriptor branch nil t nil) #s(cl-slot-descriptor commit nil t nil) #s(cl-slot-descriptor version-regexp nil t nil) #s(cl-slot-descriptor old-names nil t nil)] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8125 data (name 0 url 1 repo 2 repopage 3 files 4 branch 5 commit 6 version-regexp 7 old-names 8)) (package-gitlab-recipe package-github-recipe) ((:name . name) (:url . url) (:repo . repo) (:repopage . repopage) (:files . files) (:branch . branch) (:commit . commit) (:version-regexp . version-regexp) (:old-names . old-names)) [#s(cl-slot-descriptor url-format nil t nil) #s(cl-slot-descriptor repopage-format nil t nil) #s(cl-slot-descriptor tag-regexp "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\( [+-][0-9]\\{4\\}\\)?\\)" t nil) #s(cl-slot-descriptor stable-p nil t nil)] [nil nil "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\( [+-][0-9]\\{4\\}\\)?\\)" nil] #s(#4 nil nil nil nil nil nil nil nil nil) (:custom-groups nil))) [#s(cl-slot-descriptor name nil t nil) #s(cl-slot-descriptor url nil t nil) #s(cl-slot-descriptor repo nil t nil) #s(cl-slot-descriptor repopage nil t nil) #s(cl-slot-descriptor files nil t nil) #s(cl-slot-descriptor branch nil t nil) #s(cl-slot-descriptor commit nil t nil) #s(cl-slot-descriptor version-regexp nil t nil) #s(cl-slot-descriptor old-names nil t nil)] #s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8125 data (name 0 url 1 repo 2 repopage 3 files 4 branch 5 commit 6 version-regexp 7 old-names 8)) nil ((:name . name) (:url . url) (:repo . repo) (:repopage . repopage) (:files . files) (:branch . branch) (:commit . commit) (:version-regexp . version-regexp) (:old-names . old-names)) [#s(cl-slot-descriptor stable-p nil t nil) #s(cl-slot-descriptor tag-regexp "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\( [+-][0-9]\\{4\\}\\)?\\)" t nil) #s(cl-slot-descriptor repopage-format "https://github.com/%s" t nil) #s(cl-slot-descriptor url-format "https://github.com/%s.git" t nil)] [nil "\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\( [+-][0-9]\\{4\\}\\)?\\)" "https://github.com/%s" "https://github.com/%s.git"] #s(#2 nil nil nil nil nil nil nil nil nil) (:custom-groups nil)) "smex" nil "nonsequitur/smex" nil nil nil nil nil nil))
Successfully built 0 of 1 packagesBuilding 1 packages failed:

What should I do to build all the recipes and put the packages in archive?

package-build commit: dfcb7f0

By the way, if you really used the above script you would get this error instead (both before the fix and after):

Wrong number of arguments: (lambda (name &optional dump-archive-contents) ..., 0

To do what you want to do you would have to use package-build-all instead.