bug#47045: 28.0.50; void-variable comp-ctxt (straight.el)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#47045: 28.0.50; void-variable comp-ctxt (straight.el)

Emacs - Bugs mailing list
Jamie D Matthews <[hidden email]> writes:

> # Steps to reproduce
>
> - Run `emacs -Q`
> - Execute the following code (bootstrap for `straight.el`):
>
> ```
> (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
> "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))
> ```
>
> - This yields Lisp error: void-variable comp-ctxt
> - And backtrace:
>
> ```
> Debugger entered--Lisp error: (void-variable comp-ctxt)
> (type-of comp-ctxt)
> (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags)
> (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)
> (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t))
> (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list
> 'comp-cstr-ctxt comp-ctxt)))
> (progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list
> 'comp-cstr-ctxt comp-ctxt))) (aref comp-ctxt 5))
> (if range (progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal
> 'wrong-type-argument (list 'comp-cstr-ctxt comp-ctxt))) (aref comp-ctxt 5)) (progn (or (progn (and (memq (type-of
> comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr-ctxt comp-ctxt))) (aref
> comp-ctxt 4)))
> (let* ((mem-h (if range (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... comp-ctxt))) (aref
> comp-ctxt 5)) (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... comp-ctxt))) (aref comp-ctxt 4))))
> (res (or (gethash srcs mem-h) (puthash (mapcar #'comp-cstr-copy srcs) (apply #'comp-cstr-union-1-no-mem range srcs)
> mem-h)))) (progn (progn (or (progn (and (memq (type-of dst) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument
> (list 'comp-cstr dst))) (let* ((v dst)) (aset v 1 (progn (or (progn ...) (signal ... ...)) (aref res 1))))) (progn (or
> (progn (and (memq (type-of dst) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr dst))) (let*
> ((v dst)) (aset v 2 (progn (or (progn ...) (signal ... ...)) (aref res 2))))) (progn (or (progn (and (memq (type-of dst)
> cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr dst))) (let* ((v dst)) (aset v 3 (progn (or
> (progn ...) (signal ... ...)) (aref res 3))))) (progn (or (progn (and (memq (type-of dst) cl-struct-comp-cstr-tags) t))
> (signal 'wrong-type-argument (list 'comp-cstr dst))) (let* ((v dst)) (aset v 4 (progn (or (progn ...) (signal ... ...))
> (aref res 4)))))) res)
> comp-cstr-union-1(t #s(comp-cstr :typeset (t) :valset nil :range nil :neg nil) #s(comp-cstr :typeset (number) :valset nil
> :range nil :neg nil) #s(comp-cstr :typeset (marker) :valset nil :range nil :neg nil))
> apply(comp-cstr-union-1 t #s(comp-cstr :typeset (t) :valset nil :range nil :neg nil) (#s(comp-cstr :typeset (number)
> :valset nil :range nil :neg nil) #s(comp-cstr :typeset (marker) :valset nil :range nil :neg nil)))
> comp-cstr-union(#s(comp-cstr :typeset (t) :valset nil :range nil :neg nil) #s(comp-cstr :typeset (number) :valset nil
> :range nil :neg nil) #s(comp-cstr :typeset (marker) :valset nil :range nil :neg nil))
> apply(comp-cstr-union #s(comp-cstr :typeset (t) :valset nil :range nil :neg nil) (#s(comp-cstr :typeset (number) :valset
> nil :range nil :neg nil) #s(comp-cstr :typeset (marker) :valset nil :range nil :neg nil)))
> comp-cstr-union-make(#s(comp-cstr :typeset (number) :valset nil :range nil :neg nil) #s(comp-cstr :typeset (marker)
> :valset nil :range nil :neg nil))
> apply(comp-cstr-union-make (#s(comp-cstr :typeset (number) :valset nil :range nil :neg nil) #s(comp-cstr :typeset
> (marker) :valset nil :range nil :neg nil)))
> (let ((rest x7)) nil (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest)))
> (let* ((x7 (cdr-safe type-spec))) (let ((rest x7)) nil (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr
> rest))))
> (cond ((eq x6 'or) (let* ((x7 (cdr-safe type-spec))) (let ((rest x7)) nil (apply #'comp-cstr-union-make (mapcar
> #'comp-type-spec-to-cstr rest))))) ((eq x6 'and) (let* ((x8 (cdr-safe type-spec))) (let ((rest x8)) nil (apply
> #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'not) (let* ((x9 (cdr-safe type-spec)))
> (if (consp x9) (let* ((x10 (car-safe x9)) (x11 (cdr-safe x9))) (if (null x11) (let (...) nil (comp-cstr-negation-make
> ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x6 'integer) (let*
> ((x12 (cdr-safe type-spec))) (if (consp x12) (let* ((x13 (car-safe x12))) (cond ((integerp x13) (let* ... ...)) ((eq x13
> ...) (let* ... ...)) (t (let nil ...)))) (let nil (error "Invalid type specifier"))))) ((eq x6 'float) (let* ((x21
> (cdr-safe type-spec))) (if (consp x21) (let* ((x22 (car-safe x21))) (if (comp-star-or-num-p x22) (let* (...) (if ... ...
> ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x6 'member) (let*
> ((x26 (cdr-safe type-spec))) (let ((rest x26)) nil (apply #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest)))))
> ((eq x6 'function) (let* ((x27 (cdr-safe type-spec))) (if (consp x27) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27)))
> (if (consp x29) (let* (... ...) (if ... ... ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid
> type specifier"))))) (t (let nil (error "Invalid type specifier"))))
> (let* ((x6 (car-safe type-spec))) (cond ((eq x6 'or) (let* ((x7 (cdr-safe type-spec))) (let ((rest x7)) nil (apply
> #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'and) (let* ((x8 (cdr-safe type-spec))) (let
> ((rest x8)) nil (apply #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'not) (let* ((x9
> (cdr-safe type-spec))) (if (consp x9) (let* ((x10 ...) (x11 ...)) (if (null x11) (let ... nil ...) (let nil ...))) (let
> nil (error "Invalid type specifier"))))) ((eq x6 'integer) (let* ((x12 (cdr-safe type-spec))) (if (consp x12) (let* ((x13
> ...)) (cond (... ...) (... ...) (t ...))) (let nil (error "Invalid type specifier"))))) ((eq x6 'float) (let* ((x21
> (cdr-safe type-spec))) (if (consp x21) (let* ((x22 ...)) (if (comp-star-or-num-p x22) (let* ... ...) (let nil ...))) (let
> nil (error "Invalid type specifier"))))) ((eq x6 'member) (let* ((x26 (cdr-safe type-spec))) (let ((rest x26)) nil (apply
> #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest))))) ((eq x6 'function) (let* ((x27 (cdr-safe type-spec))) (if
> (consp x27) (let* ((x28 ...) (x29 ...)) (if (consp x29) (let* ... ...) (let nil ...))) (let nil (error "Invalid type
> specifier"))))) (t (let nil (error "Invalid type specifier")))))
> (cond ((memq type-spec '(&rest &optional)) (let ((x type-spec)) nil (if fn x (error "Invalid `%s` in type specifier"
> x)))) ((null type-spec) (let nil (record 'comp-cstr nil nil nil nil))) ((eq type-spec 'fixnum) (let nil
> (comp-irange-to-cstr (cons most-negative-fixnum most-positive-fixnum)))) ((eq type-spec 'boolean) (let nil
> (comp-type-spec-to-cstr '(member t nil)))) ((eq type-spec 'integer) (let nil (comp-irange-to-cstr '(- . +)))) ((eq
> type-spec 'null) (let nil (comp-value-to-cstr nil))) ((atom type-spec) (let nil (comp-type-to-cstr type-spec))) ((consp
> type-spec) (let* ((x6 (car-safe type-spec))) (cond ((eq x6 'or) (let* ((x7 ...)) (let (...) nil (apply ... ...)))) ((eq
> x6 'and) (let* ((x8 ...)) (let (...) nil (apply ... ...)))) ((eq x6 'not) (let* ((x9 ...)) (if (consp x9) (let* ... ...)
> (let nil ...)))) ((eq x6 'integer) (let* ((x12 ...)) (if (consp x12) (let* ... ...) (let nil ...)))) ((eq x6 'float)
> (let* ((x21 ...)) (if (consp x21) (let* ... ...) (let nil ...)))) ((eq x6 'member) (let* ((x26 ...)) (let (...) nil
> (apply ... ...)))) ((eq x6 'function) (let* ((x27 ...)) (if (consp x27) (let* ... ...) (let nil ...)))) (t (let nil
> (error "Invalid type specifier")))))) (t (let nil (error "Invalid type specifier"))))
> comp-type-spec-to-cstr((or number marker) t)
> (closure ((ret . number) (args (or number marker) (or number marker)) (x31) (x30 . number) (x29 number) (x28 (or number
> marker) (or number marker)) (x27 ((or number marker) (or number marker)) number) (x6 . function) (fn) (type-spec function
> ((or number marker) (or number marker)) number) cl-struct-comp-cstr-ctxt-tags cl-struct-comp-cstr-f-tags
> cl-struct-comp-cstr-tags t) (x) (comp-type-spec-to-cstr x t))((or number marker))
> mapcar((closure ((ret . number) (args (or number marker) (or number marker)) (x31) (x30 . number) (x29 number) (x28 (or
> number marker) (or number marker)) (x27 ((or number marker) (or number marker)) number) (x6 . function) (fn) (type-spec
> function ((or number marker) (or number marker)) number) cl-struct-comp-cstr-ctxt-tags cl-struct-comp-cstr-f-tags
> cl-struct-comp-cstr-tags t) (x) (comp-type-spec-to-cstr x t)) ((or number marker) (or number marker)))
> (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))
> (let ((args x28) (ret x30)) nil nil (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args)
> :ret (comp-type-spec-to-cstr ret)))
> (if (null x31) (let ((args x28) (ret x30)) nil nil (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr
> x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))
> (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (if (null x31) (let ((args x28) (ret x30)) nil nil (make-comp-cstr-f
> :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error
> "Invalid type specifier"))))
> (if (consp x29) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (if (null x31) (let ((args x28) (ret x30)) nil nil
> (make-comp-cstr-f :args (mapcar #'(lambda ... ...) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid
> type specifier")))) (let nil (error "Invalid type specifier")))
> (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (if (consp x29) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (if
> (null x31) (let ((args x28) (ret x30)) nil nil (make-comp-cstr-f :args (mapcar #'... args) :ret (comp-type-spec-to-cstr
> ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))
> (if (consp x27) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (if (consp x29) (let* ((x30 (car-safe x29)) (x31
> (cdr-safe x29))) (if (null x31) (let ((args x28) (ret x30)) nil nil (make-comp-cstr-f :args (mapcar ... args) :ret
> (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))
> (let nil (error "Invalid type specifier")))
> (let* ((x27 (cdr-safe type-spec))) (if (consp x27) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (if (consp x29)
> (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (if (null x31) (let (... ...) nil nil (make-comp-cstr-f :args ... :ret
> ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid
> type specifier"))))
> (cond ((eq x6 'or) (let* ((x7 (cdr-safe type-spec))) (let ((rest x7)) nil (apply #'comp-cstr-union-make (mapcar
> #'comp-type-spec-to-cstr rest))))) ((eq x6 'and) (let* ((x8 (cdr-safe type-spec))) (let ((rest x8)) nil (apply
> #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'not) (let* ((x9 (cdr-safe type-spec)))
> (if (consp x9) (let* ((x10 (car-safe x9)) (x11 (cdr-safe x9))) (if (null x11) (let (...) nil (comp-cstr-negation-make
> ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x6 'integer) (let*
> ((x12 (cdr-safe type-spec))) (if (consp x12) (let* ((x13 (car-safe x12))) (cond ((integerp x13) (let* ... ...)) ((eq x13
> ...) (let* ... ...)) (t (let nil ...)))) (let nil (error "Invalid type specifier"))))) ((eq x6 'float) (let* ((x21
> (cdr-safe type-spec))) (if (consp x21) (let* ((x22 (car-safe x21))) (if (comp-star-or-num-p x22) (let* (...) (if ... ...
> ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x6 'member) (let*
> ((x26 (cdr-safe type-spec))) (let ((rest x26)) nil (apply #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest)))))
> ((eq x6 'function) (let* ((x27 (cdr-safe type-spec))) (if (consp x27) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27)))
> (if (consp x29) (let* (... ...) (if ... ... ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid
> type specifier"))))) (t (let nil (error "Invalid type specifier"))))
> (let* ((x6 (car-safe type-spec))) (cond ((eq x6 'or) (let* ((x7 (cdr-safe type-spec))) (let ((rest x7)) nil (apply
> #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'and) (let* ((x8 (cdr-safe type-spec))) (let
> ((rest x8)) nil (apply #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'not) (let* ((x9
> (cdr-safe type-spec))) (if (consp x9) (let* ((x10 ...) (x11 ...)) (if (null x11) (let ... nil ...) (let nil ...))) (let
> nil (error "Invalid type specifier"))))) ((eq x6 'integer) (let* ((x12 (cdr-safe type-spec))) (if (consp x12) (let* ((x13
> ...)) (cond (... ...) (... ...) (t ...))) (let nil (error "Invalid type specifier"))))) ((eq x6 'float) (let* ((x21
> (cdr-safe type-spec))) (if (consp x21) (let* ((x22 ...)) (if (comp-star-or-num-p x22) (let* ... ...) (let nil ...))) (let
> nil (error "Invalid type specifier"))))) ((eq x6 'member) (let* ((x26 (cdr-safe type-spec))) (let ((rest x26)) nil (apply
> #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest))))) ((eq x6 'function) (let* ((x27 (cdr-safe type-spec))) (if
> (consp x27) (let* ((x28 ...) (x29 ...)) (if (consp x29) (let* ... ...) (let nil ...))) (let nil (error "Invalid type
> specifier"))))) (t (let nil (error "Invalid type specifier")))))
> (cond ((memq type-spec '(&rest &optional)) (let ((x type-spec)) nil (if fn x (error "Invalid `%s` in type specifier"
> x)))) ((null type-spec) (let nil (record 'comp-cstr nil nil nil nil))) ((eq type-spec 'fixnum) (let nil
> (comp-irange-to-cstr (cons most-negative-fixnum most-positive-fixnum)))) ((eq type-spec 'boolean) (let nil
> (comp-type-spec-to-cstr '(member t nil)))) ((eq type-spec 'integer) (let nil (comp-irange-to-cstr '(- . +)))) ((eq
> type-spec 'null) (let nil (comp-value-to-cstr nil))) ((atom type-spec) (let nil (comp-type-to-cstr type-spec))) ((consp
> type-spec) (let* ((x6 (car-safe type-spec))) (cond ((eq x6 'or) (let* ((x7 ...)) (let (...) nil (apply ... ...)))) ((eq
> x6 'and) (let* ((x8 ...)) (let (...) nil (apply ... ...)))) ((eq x6 'not) (let* ((x9 ...)) (if (consp x9) (let* ... ...)
> (let nil ...)))) ((eq x6 'integer) (let* ((x12 ...)) (if (consp x12) (let* ... ...) (let nil ...)))) ((eq x6 'float)
> (let* ((x21 ...)) (if (consp x21) (let* ... ...) (let nil ...)))) ((eq x6 'member) (let* ((x26 ...)) (let (...) nil
> (apply ... ...)))) ((eq x6 'function) (let* ((x27 ...)) (if (consp x27) (let* ... ...) (let nil ...)))) (t (let nil
> (error "Invalid type specifier")))))) (t (let nil (error "Invalid type specifier"))))
> comp-type-spec-to-cstr((function ((or number marker) (or number marker)) number))
> (setq cstr (comp-type-spec-to-cstr type-spec))
> (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) f (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr
> --cl-var--)))) type-spec (car --cl-var--)) (setq cstr (comp-type-spec-to-cstr type-spec)) (puthash f cstr h) (setq
> --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil))
> (let* ((comp-ctxt (make-comp-cstr-ctxt)) (h (make-hash-table :test #'eq)) (--cl-var-- comp-known-type-specifiers) (f nil)
> (type-spec nil) (--cl-var--) (cstr nil) (--cl-var-- t)) (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) f
> (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) type-spec (car --cl-var--)) (setq cstr
> (comp-type-spec-to-cstr type-spec)) (puthash f cstr h) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) h)
> (defconst comp-known-func-cstr-h (let* ((comp-ctxt (make-comp-cstr-ctxt)) (h (make-hash-table :test #'eq)) (--cl-var--
> comp-known-type-specifiers) (f nil) (type-spec nil) (--cl-var--) (cstr nil) (--cl-var-- t)) (while (consp --cl-var--)
> (setq --cl-var-- (car --cl-var--) f (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) type-spec (car
> --cl-var--)) (setq cstr (comp-type-spec-to-cstr type-spec)) (puthash f cstr h) (setq --cl-var-- (cdr --cl-var--)) (setq
> --cl-var-- nil)) h) "Hash table function -> `comp-constraint'")
> eval-buffer(#<buffer *load*-890539> nil "/home/jamie/.local/emacs/lisp/emacs-lisp/comp.el" nil t) ; Reading at buffer
> position 23647
> load-with-code-conversion("/home/jamie/.local/emacs/lisp/emacs-lisp/comp.el"
> "/home/jamie/.local/emacs/lisp/emacs-lisp/comp.el" nil t)
> require(comp)
> straight--build-native-compile((:type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch
> "master" :package "straight" :local-repo "straight.el"))
> run-hook-with-args(straight--build-native-compile (:type git :host github :repo "raxod502/straight.el" :files
> ("straight*.el") :branch "master" :package "straight" :local-repo "straight.el"))
> straight--build-package((:type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "master"
> :package "straight" :local-repo "straight.el") nil)
> #f(compiled-function () #<bytecode 0x156d4a4517957585>)()
> straight--transaction-exec(use-package-\(:type\ git\ :host\ github\ :repo\ \"raxod502/straight\.el\"\ :files\ \
> (\"straight*\.el\"\)\ :branch\ \"master\"\ :package\ \"straight\"\ :local-repo\ \"straight\.el\"\)-nil-nil :now #f
> (compiled-function () #<bytecode 0x156d4a4517957585>))
> straight-use-package((straight :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch
> "master"))
> eval-buffer(#<buffer *load*> nil "/home/jamie/.config/emacs/straight/repos/straight...." nil t) ; Reading at buffer
> position 5233
> load-with-code-conversion("/home/jamie/.config/emacs/straight/repos/straight...."
> "/home/jamie/.config/emacs/straight/repos/straight...." nil t)
> load("/home/jamie/.config/emacs/straight/repos/straight...." nil nomessage)
> (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
> (bootstrap-version 5)) (if (file-exists-p bootstrap-file) nil (save-current-buffer (set-buffer
> (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straigh..." 'silent 'inhibit-cookies)) (goto-char
> (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage))
> (progn (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el"
> user-emacs-directory)) (bootstrap-version 5)) (if (file-exists-p bootstrap-file) nil (save-current-buffer (set-buffer
> (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straigh..." 'silent 'inhibit-cookies)) (goto-char
> (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)))
> eval((progn (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el"
> user-emacs-directory)) (bootstrap-version 5)) (if (file-exists-p bootstrap-file) nil (save-current-buffer (set-buffer
> (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straigh..." 'silent 'inhibit-cookies)) (goto-char
> (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage))) t)
> elisp--eval-last-sexp(nil)
> eval-last-sexp(nil)
> funcall-interactively(eval-last-sexp nil)
> call-interactively(eval-last-sexp nil nil)
> command-execute(eval-last-sexp)
> ```
>
> In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
> of 2021-03-09 built on jdm-XPS-13-9300
> Repository revision: 79c83f79c5b618cb9ef5eca7be2245f15ff54626
> Repository branch: feature/native-comp
> Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
> System Description: Ubuntu 20.10
>
> Configured features:
> CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
> LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SOUND THREADS TIFF
> TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Hi Jamie,

I think this Emacs was not configured with "--with-native-compilation".
Could you verify that?

Thanks

  Andrea



Reply | Threaded
Open this post in threaded view
|

bug#47045: 28.0.50; void-variable comp-ctxt (straight.el)

Jamie Matthews
Hi Andrea,

Ah, sorry I used the flag but didn't notice I was missing a system dependency. After recompiling, it's just warnings.

Thanks so much for your work on native compilation, it already noticeably improves my emacs experience!

Many thanks,

Jamie

From: Andrea Corallo <[hidden email]>
Sent: Wednesday, March 10, 2021 1:31 PM
To: Jamie Matthews <[hidden email]>
Cc: [hidden email] <[hidden email]>
Subject: Re: bug#47045: 28.0.50; void-variable comp-ctxt (straight.el)
 
Jamie D Matthews <[hidden email]> writes:

> # Steps to reproduce
>
> - Run `emacs -Q`
> - Execute the following code (bootstrap for `straight.el`):
>
> ```
> (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
> "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))
> ```
>
> - This yields Lisp error: void-variable comp-ctxt
> - And backtrace:
>
> ```
> Debugger entered--Lisp error: (void-variable comp-ctxt)
> (type-of comp-ctxt)
> (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags)
> (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)
> (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t))
> (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list
> 'comp-cstr-ctxt comp-ctxt)))
> (progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list
> 'comp-cstr-ctxt comp-ctxt))) (aref comp-ctxt 5))
> (if range (progn (or (progn (and (memq (type-of comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal
> 'wrong-type-argument (list 'comp-cstr-ctxt comp-ctxt))) (aref comp-ctxt 5)) (progn (or (progn (and (memq (type-of
> comp-ctxt) cl-struct-comp-cstr-ctxt-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr-ctxt comp-ctxt))) (aref
> comp-ctxt 4)))
> (let* ((mem-h (if range (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... comp-ctxt))) (aref
> comp-ctxt 5)) (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... comp-ctxt))) (aref comp-ctxt 4))))
> (res (or (gethash srcs mem-h) (puthash (mapcar #'comp-cstr-copy srcs) (apply #'comp-cstr-union-1-no-mem range srcs)
> mem-h)))) (progn (progn (or (progn (and (memq (type-of dst) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument
> (list 'comp-cstr dst))) (let* ((v dst)) (aset v 1 (progn (or (progn ...) (signal ... ...)) (aref res 1))))) (progn (or
> (progn (and (memq (type-of dst) cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr dst))) (let*
> ((v dst)) (aset v 2 (progn (or (progn ...) (signal ... ...)) (aref res 2))))) (progn (or (progn (and (memq (type-of dst)
> cl-struct-comp-cstr-tags) t)) (signal 'wrong-type-argument (list 'comp-cstr dst))) (let* ((v dst)) (aset v 3 (progn (or
> (progn ...) (signal ... ...)) (aref res 3))))) (progn (or (progn (and (memq (type-of dst) cl-struct-comp-cstr-tags) t))
> (signal 'wrong-type-argument (list 'comp-cstr dst))) (let* ((v dst)) (aset v 4 (progn (or (progn ...) (signal ... ...))
> (aref res 4)))))) res)
> comp-cstr-union-1(t #s(comp-cstr :typeset (t) :valset nil :range nil :neg nil) #s(comp-cstr :typeset (number) :valset nil
> :range nil :neg nil) #s(comp-cstr :typeset (marker) :valset nil :range nil :neg nil))
> apply(comp-cstr-union-1 t #s(comp-cstr :typeset (t) :valset nil :range nil :neg nil) (#s(comp-cstr :typeset (number)
> :valset nil :range nil :neg nil) #s(comp-cstr :typeset (marker) :valset nil :range nil :neg nil)))
> comp-cstr-union(#s(comp-cstr :typeset (t) :valset nil :range nil :neg nil) #s(comp-cstr :typeset (number) :valset nil
> :range nil :neg nil) #s(comp-cstr :typeset (marker) :valset nil :range nil :neg nil))
> apply(comp-cstr-union #s(comp-cstr :typeset (t) :valset nil :range nil :neg nil) (#s(comp-cstr :typeset (number) :valset
> nil :range nil :neg nil) #s(comp-cstr :typeset (marker) :valset nil :range nil :neg nil)))
> comp-cstr-union-make(#s(comp-cstr :typeset (number) :valset nil :range nil :neg nil) #s(comp-cstr :typeset (marker)
> :valset nil :range nil :neg nil))
> apply(comp-cstr-union-make (#s(comp-cstr :typeset (number) :valset nil :range nil :neg nil) #s(comp-cstr :typeset
> (marker) :valset nil :range nil :neg nil)))
> (let ((rest x7)) nil (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest)))
> (let* ((x7 (cdr-safe type-spec))) (let ((rest x7)) nil (apply #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr
> rest))))
> (cond ((eq x6 'or) (let* ((x7 (cdr-safe type-spec))) (let ((rest x7)) nil (apply #'comp-cstr-union-make (mapcar
> #'comp-type-spec-to-cstr rest))))) ((eq x6 'and) (let* ((x8 (cdr-safe type-spec))) (let ((rest x8)) nil (apply
> #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'not) (let* ((x9 (cdr-safe type-spec)))
> (if (consp x9) (let* ((x10 (car-safe x9)) (x11 (cdr-safe x9))) (if (null x11) (let (...) nil (comp-cstr-negation-make
> ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x6 'integer) (let*
> ((x12 (cdr-safe type-spec))) (if (consp x12) (let* ((x13 (car-safe x12))) (cond ((integerp x13) (let* ... ...)) ((eq x13
> ...) (let* ... ...)) (t (let nil ...)))) (let nil (error "Invalid type specifier"))))) ((eq x6 'float) (let* ((x21
> (cdr-safe type-spec))) (if (consp x21) (let* ((x22 (car-safe x21))) (if (comp-star-or-num-p x22) (let* (...) (if ... ...
> ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x6 'member) (let*
> ((x26 (cdr-safe type-spec))) (let ((rest x26)) nil (apply #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest)))))
> ((eq x6 'function) (let* ((x27 (cdr-safe type-spec))) (if (consp x27) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27)))
> (if (consp x29) (let* (... ...) (if ... ... ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid
> type specifier"))))) (t (let nil (error "Invalid type specifier"))))
> (let* ((x6 (car-safe type-spec))) (cond ((eq x6 'or) (let* ((x7 (cdr-safe type-spec))) (let ((rest x7)) nil (apply
> #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'and) (let* ((x8 (cdr-safe type-spec))) (let
> ((rest x8)) nil (apply #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'not) (let* ((x9
> (cdr-safe type-spec))) (if (consp x9) (let* ((x10 ...) (x11 ...)) (if (null x11) (let ... nil ...) (let nil ...))) (let
> nil (error "Invalid type specifier"))))) ((eq x6 'integer) (let* ((x12 (cdr-safe type-spec))) (if (consp x12) (let* ((x13
> ...)) (cond (... ...) (... ...) (t ...))) (let nil (error "Invalid type specifier"))))) ((eq x6 'float) (let* ((x21
> (cdr-safe type-spec))) (if (consp x21) (let* ((x22 ...)) (if (comp-star-or-num-p x22) (let* ... ...) (let nil ...))) (let
> nil (error "Invalid type specifier"))))) ((eq x6 'member) (let* ((x26 (cdr-safe type-spec))) (let ((rest x26)) nil (apply
> #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest))))) ((eq x6 'function) (let* ((x27 (cdr-safe type-spec))) (if
> (consp x27) (let* ((x28 ...) (x29 ...)) (if (consp x29) (let* ... ...) (let nil ...))) (let nil (error "Invalid type
> specifier"))))) (t (let nil (error "Invalid type specifier")))))
> (cond ((memq type-spec '(&rest &optional)) (let ((x type-spec)) nil (if fn x (error "Invalid `%s` in type specifier"
> x)))) ((null type-spec) (let nil (record 'comp-cstr nil nil nil nil))) ((eq type-spec 'fixnum) (let nil
> (comp-irange-to-cstr (cons most-negative-fixnum most-positive-fixnum)))) ((eq type-spec 'boolean) (let nil
> (comp-type-spec-to-cstr '(member t nil)))) ((eq type-spec 'integer) (let nil (comp-irange-to-cstr '(- . +)))) ((eq
> type-spec 'null) (let nil (comp-value-to-cstr nil))) ((atom type-spec) (let nil (comp-type-to-cstr type-spec))) ((consp
> type-spec) (let* ((x6 (car-safe type-spec))) (cond ((eq x6 'or) (let* ((x7 ...)) (let (...) nil (apply ... ...)))) ((eq
> x6 'and) (let* ((x8 ...)) (let (...) nil (apply ... ...)))) ((eq x6 'not) (let* ((x9 ...)) (if (consp x9) (let* ... ...)
> (let nil ...)))) ((eq x6 'integer) (let* ((x12 ...)) (if (consp x12) (let* ... ...) (let nil ...)))) ((eq x6 'float)
> (let* ((x21 ...)) (if (consp x21) (let* ... ...) (let nil ...)))) ((eq x6 'member) (let* ((x26 ...)) (let (...) nil
> (apply ... ...)))) ((eq x6 'function) (let* ((x27 ...)) (if (consp x27) (let* ... ...) (let nil ...)))) (t (let nil
> (error "Invalid type specifier")))))) (t (let nil (error "Invalid type specifier"))))
> comp-type-spec-to-cstr((or number marker) t)
> (closure ((ret . number) (args (or number marker) (or number marker)) (x31) (x30 . number) (x29 number) (x28 (or number
> marker) (or number marker)) (x27 ((or number marker) (or number marker)) number) (x6 . function) (fn) (type-spec function
> ((or number marker) (or number marker)) number) cl-struct-comp-cstr-ctxt-tags cl-struct-comp-cstr-f-tags
> cl-struct-comp-cstr-tags t) (x) (comp-type-spec-to-cstr x t))((or number marker))
> mapcar((closure ((ret . number) (args (or number marker) (or number marker)) (x31) (x30 . number) (x29 number) (x28 (or
> number marker) (or number marker)) (x27 ((or number marker) (or number marker)) number) (x6 . function) (fn) (type-spec
> function ((or number marker) (or number marker)) number) cl-struct-comp-cstr-ctxt-tags cl-struct-comp-cstr-f-tags
> cl-struct-comp-cstr-tags t) (x) (comp-type-spec-to-cstr x t)) ((or number marker) (or number marker)))
> (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))
> (let ((args x28) (ret x30)) nil nil (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args)
> :ret (comp-type-spec-to-cstr ret)))
> (if (null x31) (let ((args x28) (ret x30)) nil nil (make-comp-cstr-f :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr
> x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))
> (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (if (null x31) (let ((args x28) (ret x30)) nil nil (make-comp-cstr-f
> :args (mapcar #'(lambda (x) (comp-type-spec-to-cstr x t)) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error
> "Invalid type specifier"))))
> (if (consp x29) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (if (null x31) (let ((args x28) (ret x30)) nil nil
> (make-comp-cstr-f :args (mapcar #'(lambda ... ...) args) :ret (comp-type-spec-to-cstr ret))) (let nil (error "Invalid
> type specifier")))) (let nil (error "Invalid type specifier")))
> (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (if (consp x29) (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (if
> (null x31) (let ((args x28) (ret x30)) nil nil (make-comp-cstr-f :args (mapcar #'... args) :ret (comp-type-spec-to-cstr
> ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))
> (if (consp x27) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (if (consp x29) (let* ((x30 (car-safe x29)) (x31
> (cdr-safe x29))) (if (null x31) (let ((args x28) (ret x30)) nil nil (make-comp-cstr-f :args (mapcar ... args) :ret
> (comp-type-spec-to-cstr ret))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))
> (let nil (error "Invalid type specifier")))
> (let* ((x27 (cdr-safe type-spec))) (if (consp x27) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27))) (if (consp x29)
> (let* ((x30 (car-safe x29)) (x31 (cdr-safe x29))) (if (null x31) (let (... ...) nil nil (make-comp-cstr-f :args ... :ret
> ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid
> type specifier"))))
> (cond ((eq x6 'or) (let* ((x7 (cdr-safe type-spec))) (let ((rest x7)) nil (apply #'comp-cstr-union-make (mapcar
> #'comp-type-spec-to-cstr rest))))) ((eq x6 'and) (let* ((x8 (cdr-safe type-spec))) (let ((rest x8)) nil (apply
> #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'not) (let* ((x9 (cdr-safe type-spec)))
> (if (consp x9) (let* ((x10 (car-safe x9)) (x11 (cdr-safe x9))) (if (null x11) (let (...) nil (comp-cstr-negation-make
> ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x6 'integer) (let*
> ((x12 (cdr-safe type-spec))) (if (consp x12) (let* ((x13 (car-safe x12))) (cond ((integerp x13) (let* ... ...)) ((eq x13
> ...) (let* ... ...)) (t (let nil ...)))) (let nil (error "Invalid type specifier"))))) ((eq x6 'float) (let* ((x21
> (cdr-safe type-spec))) (if (consp x21) (let* ((x22 (car-safe x21))) (if (comp-star-or-num-p x22) (let* (...) (if ... ...
> ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid type specifier"))))) ((eq x6 'member) (let*
> ((x26 (cdr-safe type-spec))) (let ((rest x26)) nil (apply #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest)))))
> ((eq x6 'function) (let* ((x27 (cdr-safe type-spec))) (if (consp x27) (let* ((x28 (car-safe x27)) (x29 (cdr-safe x27)))
> (if (consp x29) (let* (... ...) (if ... ... ...)) (let nil (error "Invalid type specifier")))) (let nil (error "Invalid
> type specifier"))))) (t (let nil (error "Invalid type specifier"))))
> (let* ((x6 (car-safe type-spec))) (cond ((eq x6 'or) (let* ((x7 (cdr-safe type-spec))) (let ((rest x7)) nil (apply
> #'comp-cstr-union-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'and) (let* ((x8 (cdr-safe type-spec))) (let
> ((rest x8)) nil (apply #'comp-cstr-intersection-make (mapcar #'comp-type-spec-to-cstr rest))))) ((eq x6 'not) (let* ((x9
> (cdr-safe type-spec))) (if (consp x9) (let* ((x10 ...) (x11 ...)) (if (null x11) (let ... nil ...) (let nil ...))) (let
> nil (error "Invalid type specifier"))))) ((eq x6 'integer) (let* ((x12 (cdr-safe type-spec))) (if (consp x12) (let* ((x13
> ...)) (cond (... ...) (... ...) (t ...))) (let nil (error "Invalid type specifier"))))) ((eq x6 'float) (let* ((x21
> (cdr-safe type-spec))) (if (consp x21) (let* ((x22 ...)) (if (comp-star-or-num-p x22) (let* ... ...) (let nil ...))) (let
> nil (error "Invalid type specifier"))))) ((eq x6 'member) (let* ((x26 (cdr-safe type-spec))) (let ((rest x26)) nil (apply
> #'comp-cstr-union-make (mapcar #'comp-value-to-cstr rest))))) ((eq x6 'function) (let* ((x27 (cdr-safe type-spec))) (if
> (consp x27) (let* ((x28 ...) (x29 ...)) (if (consp x29) (let* ... ...) (let nil ...))) (let nil (error "Invalid type
> specifier"))))) (t (let nil (error "Invalid type specifier")))))
> (cond ((memq type-spec '(&rest &optional)) (let ((x type-spec)) nil (if fn x (error "Invalid `%s` in type specifier"
> x)))) ((null type-spec) (let nil (record 'comp-cstr nil nil nil nil))) ((eq type-spec 'fixnum) (let nil
> (comp-irange-to-cstr (cons most-negative-fixnum most-positive-fixnum)))) ((eq type-spec 'boolean) (let nil
> (comp-type-spec-to-cstr '(member t nil)))) ((eq type-spec 'integer) (let nil (comp-irange-to-cstr '(- . +)))) ((eq
> type-spec 'null) (let nil (comp-value-to-cstr nil))) ((atom type-spec) (let nil (comp-type-to-cstr type-spec))) ((consp
> type-spec) (let* ((x6 (car-safe type-spec))) (cond ((eq x6 'or) (let* ((x7 ...)) (let (...) nil (apply ... ...)))) ((eq
> x6 'and) (let* ((x8 ...)) (let (...) nil (apply ... ...)))) ((eq x6 'not) (let* ((x9 ...)) (if (consp x9) (let* ... ...)
> (let nil ...)))) ((eq x6 'integer) (let* ((x12 ...)) (if (consp x12) (let* ... ...) (let nil ...)))) ((eq x6 'float)
> (let* ((x21 ...)) (if (consp x21) (let* ... ...) (let nil ...)))) ((eq x6 'member) (let* ((x26 ...)) (let (...) nil
> (apply ... ...)))) ((eq x6 'function) (let* ((x27 ...)) (if (consp x27) (let* ... ...) (let nil ...)))) (t (let nil
> (error "Invalid type specifier")))))) (t (let nil (error "Invalid type specifier"))))
> comp-type-spec-to-cstr((function ((or number marker) (or number marker)) number))
> (setq cstr (comp-type-spec-to-cstr type-spec))
> (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) f (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr
> --cl-var--)))) type-spec (car --cl-var--)) (setq cstr (comp-type-spec-to-cstr type-spec)) (puthash f cstr h) (setq
> --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil))
> (let* ((comp-ctxt (make-comp-cstr-ctxt)) (h (make-hash-table :test #'eq)) (--cl-var-- comp-known-type-specifiers) (f nil)
> (type-spec nil) (--cl-var--) (cstr nil) (--cl-var-- t)) (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) f
> (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) type-spec (car --cl-var--)) (setq cstr
> (comp-type-spec-to-cstr type-spec)) (puthash f cstr h) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) h)
> (defconst comp-known-func-cstr-h (let* ((comp-ctxt (make-comp-cstr-ctxt)) (h (make-hash-table :test #'eq)) (--cl-var--
> comp-known-type-specifiers) (f nil) (type-spec nil) (--cl-var--) (cstr nil) (--cl-var-- t)) (while (consp --cl-var--)
> (setq --cl-var-- (car --cl-var--) f (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) type-spec (car
> --cl-var--)) (setq cstr (comp-type-spec-to-cstr type-spec)) (puthash f cstr h) (setq --cl-var-- (cdr --cl-var--)) (setq
> --cl-var-- nil)) h) "Hash table function -> `comp-constraint'")
> eval-buffer(#<buffer *load*-890539> nil "/home/jamie/.local/emacs/lisp/emacs-lisp/comp.el" nil t) ; Reading at buffer
> position 23647
> load-with-code-conversion("/home/jamie/.local/emacs/lisp/emacs-lisp/comp.el"
> "/home/jamie/.local/emacs/lisp/emacs-lisp/comp.el" nil t)
> require(comp)
> straight--build-native-compile((:type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch
> "master" :package "straight" :local-repo "straight.el"))
> run-hook-with-args(straight--build-native-compile (:type git :host github :repo "raxod502/straight.el" :files
> ("straight*.el") :branch "master" :package "straight" :local-repo "straight.el"))
> straight--build-package((:type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch "master"
> :package "straight" :local-repo "straight.el") nil)
> #f(compiled-function () #<bytecode 0x156d4a4517957585>)()
> straight--transaction-exec(use-package-\(:type\ git\ :host\ github\ :repo\ \"raxod502/straight\.el\"\ :files\ \
> (\"straight*\.el\"\)\ :branch\ \"master\"\ :package\ \"straight\"\ :local-repo\ \"straight\.el\"\)-nil-nil :now #f
> (compiled-function () #<bytecode 0x156d4a4517957585>))
> straight-use-package((straight :type git :host github :repo "raxod502/straight.el" :files ("straight*.el") :branch
> "master"))
> eval-buffer(#<buffer *load*> nil "/home/jamie/.config/emacs/straight/repos/straight...." nil t) ; Reading at buffer
> position 5233
> load-with-code-conversion("/home/jamie/.config/emacs/straight/repos/straight...."
> "/home/jamie/.config/emacs/straight/repos/straight...." nil t)
> load("/home/jamie/.config/emacs/straight/repos/straight...." nil nomessage)
> (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
> (bootstrap-version 5)) (if (file-exists-p bootstrap-file) nil (save-current-buffer (set-buffer
> (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straigh..." 'silent 'inhibit-cookies)) (goto-char
> (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage))
> (progn (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el"
> user-emacs-directory)) (bootstrap-version 5)) (if (file-exists-p bootstrap-file) nil (save-current-buffer (set-buffer
> (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straigh..." 'silent 'inhibit-cookies)) (goto-char
> (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)))
> eval((progn (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el"
> user-emacs-directory)) (bootstrap-version 5)) (if (file-exists-p bootstrap-file) nil (save-current-buffer (set-buffer
> (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straigh..." 'silent 'inhibit-cookies)) (goto-char
> (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage))) t)
> elisp--eval-last-sexp(nil)
> eval-last-sexp(nil)
> funcall-interactively(eval-last-sexp nil)
> call-interactively(eval-last-sexp nil nil)
> command-execute(eval-last-sexp)
> ```
>
> In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
> of 2021-03-09 built on jdm-XPS-13-9300
> Repository revision: 79c83f79c5b618cb9ef5eca7be2245f15ff54626
> Repository branch: feature/native-comp
> Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
> System Description: Ubuntu 20.10
>
> Configured features:
> CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
> LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SOUND THREADS TIFF
> TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Hi Jamie,

I think this Emacs was not configured with "--with-native-compilation".
Could you verify that?

Thanks

  Andrea
Reply | Threaded
Open this post in threaded view
|

bug#47045: 28.0.50; void-variable comp-ctxt (straight.el)

Emacs - Bugs mailing list
Jamie Matthews <[hidden email]> writes:

> Hi Andrea,
>
> Ah, sorry I used the flag but didn't notice I was missing a system dependency. After recompiling, it's just warnings.
>
> Thanks so much for your work on native compilation, it already noticeably improves my emacs experience!

Happy to hear! :)

closing this.

Thanks for reporting

  Andrea



Reply | Threaded
Open this post in threaded view
|

bug#47045: 28.0.50; void-variable comp-ctxt (straight.el)

Stefan Kangas
Andrea Corallo <[hidden email]> writes:

> Jamie Matthews <[hidden email]> writes:
>
>> Hi Andrea,
>>
>> Ah, sorry I used the flag but didn't notice I was missing a system dependency. After recompiling, it's just warnings.
>>
>> Thanks so much for your work on native compilation, it already noticeably improves my emacs experience!
>
> Happy to hear! :)
>
> closing this.
>
> Thanks for reporting
>
>   Andrea

This seems to have been left open by accident, so I'm closing it now.