Straight.el: straight-vc: VC backend ‘built-in’ does not implement method ‘keywords’

Created on 23 Oct 2020  Â·  4Comments  Â·  Source: raxod502/straight.el

What's wrong

The following snippet (and all my other :type built-in recipes) raises the error in the title:

(use-package recentf-mode
  :straight (recentf-mode :type built-in)
  :hook (after-init . recentf-mode))

Directions to reproduce

I have already added the erroneous snippet. This might be specific to my EmacsGCC version, but I have bisected the error to this particular commit: https://github.com/raxod502/straight.el/commit/48b0f1f

Version information

  • Emacs version: GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.21, cairo version 1.16.0)
  • Operating system: NixOS
bug built-in regression vc

All 4 comments

Confirmed with:


Test Case

(straight-bug-report
  :post-bootstrap 
  (straight-use-package
   '(recentf-mode :type built-in)))

  • Test run at: 2020-10-23 11:48:36
  • system-type: gnu/linux
  • straight-version: prerelease (HEAD -> feat/straight-use-package-only-show-installed, origin/develop, develop) a856388 2020-10-17
  • emacs-version: GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.3, Xaw3d scroll bars) of 2020-10-14

Output

Bootstrapping straight.el...
Bootstrapping straight.el...done
Rebuilding all packages due to build cache schema change
Looking for gnu-elpa-mirror recipe → Cloning melpa...
Looking for gnu-elpa-mirror recipe → Cloning melpa...done
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...done
Looking for straight recipe → Cloning emacsmirror-mirror...
Looking for straight recipe → Cloning emacsmirror-mirror...done
Building straight...
Building straight...done

Test run with version: prerelease (HEAD -> develop, origin/develop) a856388 2020-10-17
Debugger entered--Lisp error: (error "VC backend ‘built-in’ does not implement method ‘k...")
  signal(error ("VC backend ‘built-in’ does not implement method ‘k..."))
  error("VC backend `%S' does not implement method `%S'" built-in keywords)
  straight-vc(keywords built-in)
  straight-vc-keywords(built-in)
  straight--convert-recipe((recentf-mode :type built-in) nil)
  straight-use-package((recentf-mode :type built-in))
  (let ((straight-bug-report-args '(:post-bootstrap (progn (straight-use-package '...)) :executable "/usr/bin/emacs" :user-dir "/tmp/straight.el-test-k4Btgh"))) (setq user-emacs-directory "/tmp/straight.el-test-k4Btgh") (setq straight-repository-branch "develop") (setq debug-on-error t) (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously (concat "https://raw.githubusercontent.com/" "raxod502/straight.el/develop/install.el") 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (condition-case nil (message "Test run with version: %s" (straight-version)) (error nil)) (straight-use-package '(recentf-mode :type built-in)))
  eval((let ((straight-bug-report-args '(:post-bootstrap (progn (straight-use-package ...)) :executable "/usr/bin/emacs" :user-dir "/tmp/straight.el-test-k4Btgh"))) (setq user-emacs-directory "/tmp/straight.el-test-k4Btgh") (setq straight-repository-branch "develop") (setq debug-on-error t) (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously (concat "https://raw.githubusercontent.com/" "raxod502/straight.el/develop/install.el") 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (condition-case nil (message "Test run with version: %s" (straight-version)) (error nil)) (straight-use-package '(recentf-mode :type built-in))) t)
  command-line-1(("--eval" "(let\n    ((straight-bug-report-args\n      '(:post-..."))
  command-line()
  normal-top-level()


Looking into it now.

@omidmnz: Thank you for the report. I believe #618 should take care of this.

Tested on my end using:


Test Case

(straight-bug-report
  :user-dir "fix-617.straight"
  :pre-bootstrap 
  (setq straight-repository-user "progfolio")
  (setq straight-repository-branch "fix/convert-recipe-built-in-617")
  :post-bootstrap 
  (message "%S"
           (straight-use-package
            '(recentf-mode :type built-in))))

  • Test run at: 2020-10-23 13:39:26
  • system-type: gnu/linux
  • straight-version: prerelease (HEAD -> fix/convert-recipe-built-in-617, fork/fix/convert-recipe-built-in-617) f9f24d5 2020-10-23
  • emacs-version: GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.3, Xaw3d scroll bars) of 2020-10-14

Output

Bootstrapping straight.el...
Bootstrapping straight.el...done
Rebuilding all packages due to build cache schema change
Looking for gnu-elpa-mirror recipe → Cloning melpa...
Looking for gnu-elpa-mirror recipe → Cloning melpa...done
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...
Looking for emacsmirror-mirror recipe → Cloning gnu-elpa-mirror...done
Looking for straight recipe → Cloning emacsmirror-mirror...
Looking for straight recipe → Cloning emacsmirror-mirror...done
Building straight...
Building straight...done

Test run with version: prerelease (HEAD -> fix/convert-recipe-built-in-617, origin/fix/convert-recipe-built-in-617) f9f24d5 2020-10-23
t

Would you mind testing this branch on your system?

@progfolio Thank you. Your PR resolves the issue for my use cases.

@omidmnz Thank you for testing. Will merge to develop branch.

@raxod502 I'm going to merge this fix, but I think we can refactor straight--convert-recipe to make the logic cleaner overall. I'll work on that and a proper unit test in a separate pull soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aspiers picture aspiers  Â·  4Comments

rsbowman picture rsbowman  Â·  3Comments

enko picture enko  Â·  4Comments

hlissner picture hlissner  Â·  3Comments

agsdot picture agsdot  Â·  4Comments