radian-software / straight.el

πŸ€ Next-generation, purely functional package manager for the Emacs hacker.
MIT License
2.73k stars 150 forks source link

`:build (:not native-compile)` triggers `Error: (void-variable native-comp-deferred-compilation-deny-list)` on Emacs 27.2 #772

Closed declantsien closed 3 years ago

declantsien commented 3 years ago

Recently I decided to switch back to Emacs 27.2 for some stability. I have one custom recipe which have :build (:not native-compile). Sure, Emacs 27.2 doesn't have native compilation. But I think recipe with :build (:not native-compile) should work too.

Below is straight-bug-report with straight-get-recipe version of org with extra :not native-compile

Test Case ```emacs-lisp (straight-bug-report :pre-bootstrap (message "before bootstrap") (message "multiple forms allowed") :post-bootstrap (message "after bootstrap") (message "multiple forms allowed") (straight-use-package '(org :type git :repo "https://code.orgmode.org/bzg/org-mode.git" :local-repo "org" :depth full :pre-build (straight-recipes-org-elpa--build) :build (:not autoloads :not native-compile) :files (:defaults "lisp/*.el" ("etc/styles/" "etc/styles/*")))) (message "bye")) ```
Output ```emacs-lisp before bootstrap multiple forms allowed 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 emacsmirror-mirror recipe β†’ Cloning el-get... Looking for emacsmirror-mirror recipe β†’ Cloning el-get...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) e46292d 2021-05-12 after bootstrap multiple forms allowed Cloning org... Cloning org...done Packages: "org-elpa" n/a n/a "melpa" n/a master 19d1adfa 2021-05-31 "gnu-elpa-mirror" n/a master 6417888 2021-05-29 "el-get" melpa master d76ac84a 2021-04-28 "emacsmirror-mirror" n/a master a3cf645 2021-05-29 "straight" n/a develop e46292d 2021-05-12 Error: (void-variable native-comp-deferred-compilation-deny-list) ```
progfolio commented 3 years ago

Thanks for bringing this to our attention. Would you mind testing this patch by running the following test case?:

Test Case ```emacs-lisp (straight-bug-report :user-dir "void-comp-deny.straight" :pre-bootstrap (setq straight-repository-user "progfolio" straight-repository-branch "fix/void-comp-deny-guard") :post-bootstrap (straight-use-package '(org :build (:not autoloads native-compile))) (require 'org) (org-version nil 'full 'message)) ```
Output ```emacs-lisp 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 emacsmirror-mirror recipe β†’ Cloning el-get... Looking for emacsmirror-mirror recipe β†’ Cloning el-get...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/void-comp-deny-guard, origin/fix/void-comp-deny-guard) cfb790e 2021-05-31 Cloning org... Cloning org...done Building org... Building org...done Org mode version 9.4.6 (9.4.6-ga0a87d @ /tmp/void-comp-deny.straight/straight/build/org/) Packages: "org-elpa" n/a n/a "melpa" n/a master 19d1adfa 2021-05-31 "gnu-elpa-mirror" n/a master 6417888 2021-05-29 "el-get" melpa master d76ac84a 2021-04-28 "emacsmirror-mirror" n/a master a3cf645 2021-05-29 "straight" n/a fix/void-comp-deny-guard cfb790e 2021-05-31 "org" org-elpa master a0a87d55c 2021-05-30 ```

Your test case's :build step list has multiple :not keywords. :not applies to the whole list if it is the car of the list. Multiple :nots won't harm anything, but they're not doing anything either.

(:not autoloads :not native-compile)

and

(:not autoloads native-compile)

are functionally equivalent.

declantsien commented 3 years ago
Test Case ```emacs-lisp (straight-bug-report :user-dir "void-comp-deny.straight" :pre-bootstrap (setq straight-repository-user "progfolio" straight-repository-branch "fix/void-comp-deny-guard") :post-bootstrap (straight-use-package '(org :build (:not autoloads native-compile))) (require 'org) (org-version nil 'full 'message)) ```
Output ```emacs-lisp 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 emacsmirror-mirror recipe β†’ Cloning el-get... Looking for emacsmirror-mirror recipe β†’ Cloning el-get...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/void-comp-deny-guard, origin/fix/void-comp-deny-guard) cfb790e 2021-05-31 Cloning org... Cloning org...done Building org... Building org...done Org mode version 9.4.6 (9.4.6-ga0a87d @ /tmp/void-comp-deny.straight/straight/build/org/) Packages: "org-elpa" n/a n/a "melpa" n/a master 09553972 2021-05-31 "gnu-elpa-mirror" n/a master 6417888 2021-05-29 "el-get" melpa master d76ac84a 2021-04-28 "emacsmirror-mirror" n/a master a3cf645 2021-05-29 "straight" n/a fix/void-comp-deny-guard cfb790e 2021-05-31 "org" org-elpa master a0a87d55c 2021-05-30 ```

Your test case's :build step list has multiple :not keywords.

Thanks for telling me this. I thought multi :not is necessary.

progfolio commented 3 years ago

It looks like the patch is working fine. I've merged it into the "develop" branch. You should be able to update via M-x straight-pull-package straight and then rebuilding straight. Let me know if that works for you. Thanks again for testing.

declantsien commented 3 years ago

Yeah. It works fine for me now. Thanks.