radian-software / straight.el

🍀 Next-generation, purely functional package manager for the Emacs hacker.
MIT License
2.72k stars 150 forks source link

Emacs 30 breaks use-package integration for use-package forms which use `:straight nil` #1080

Open emacswatcher opened 1 year ago

emacswatcher commented 1 year ago

What's wrong

Starting after build from git source commit ecdd3a9efac3e56850ce10260747c158865f9378 (i.e. today) produces these errors. None of them occurred in 28.2.

Please note that all of these use :straight nil in their use-package forms because they are either built-in or encapsulate inline symbols.

Also, as seen below, I use the latest bootstrap and switch to the develop branch in an unsuccessful attempt to prevent the native-comp-deferred-compilation-deny-list issue as documented in

https://jeffkreeftmeijer.com/emacs-native-comp-log/

⛔ Warning (initialization): An error occurred while loading ‘/home/emacswatcher/.emacs.d/early-init.el’:

Symbol's value as variable is void: native-comp-deferred-compilation-deny-list

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.
⛔ Error (use-package): Failed to parse package asoc: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Failed to parse package peval: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Failed to parse package crm-prompt: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Failed to parse package dubcaps-mode: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Failed to parse package set-scroll-margin: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Failed to parse package start-per-user-server: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Failed to parse package comment-line-or-region: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Failed to parse package abbrev: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Failed to parse package blamer: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Failed to parse package popon: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Failed to parse package consult-projectile: use-package: Unrecognized keyword: :straight
⛔ Error (use-package): Cannot load ctrlf
⛔ Error (use-package): Cannot load default-text-scale
⛔ Warning (initialization): An error occurred while loading ‘/home/emacswatcher/.emacs.d/init.el’:

early-init.el fragment:

(setq straight-base-dir                "/var/shared-elpa"
      package-enable-at-startup        nil
      file-name-handler-alist          nil
      file-name-handler-alist          nil
      message-log-max                  16384
      gc-cons-threshold                most-positive-fixnum
      gc-cons-percentage               0.6
      auto-window-vscroll              nil
      load-prefer-newer                t
      large-file-warning-threshold     10000000
      native-comp-async-report-warnings-errors nil
      straight-repository-branch       "develop"
      straight-check-for-modifications 'live-with-find
      straight-cache-autoloads         t
      straight-use-package-by-default  t
      install-run                      nil)

(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el"
                         user-emacs-directory))
      (bootstrap-version 6))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(straight-use-package 'use-package)

(setq use-package-verbose t)

(use-package bind-key)
(use-package use-package-ensure-system-package)

Contents of straight-process:

$ cd /var/shared-elpa/straight/repos/
$ git clone --origin origin --no-checkout https\://github.com/raxod502/straight.el.git /var/shared-elpa/straight/repos/straight.el/ --no-single-branch --branch develop

Cloning into '/var/shared-elpa/straight/repos/straight.el'...

[Return code: 0]

$ cd /var/shared-elpa/straight/repos/straight.el/
$ git checkout -B develop origin/develop

branch 'develop' set up to track 'origin/develop'.
Your branch is up to date with 'origin/develop'.
Reset branch 'develop'

[Return code: 0]

$ cd /var/shared-elpa/straight/repos/straight.el/
$ git submodule update --init --recursive

[Return code: 0]

Version information

progfolio commented 1 year ago

Also, as seen below, I use the latest bootstrap and switch to the develop branch in an unsuccessful attempt to prevent the native-comp-deferred-compilation-deny-list issue as documented in https://jeffkreeftmeijer.com/emacs-native-comp-log/

The fix for this has since been merged to the master branch. So no need to switch to the develop branch. Please see: https://github.com/radian-software/straight.el/issues/1073

M-x straight-version will help you know if you're running a version of straight which includes the patch mentioned above.

use-package is bundled with Emacs 30. Please see: https://github.com/radian-software/straight.el/issues/1035

@raxod502 : We've had several duplicate issues for these two, so I've pinned them for now.

raxod502 commented 1 year ago

Sounds good, thank you!

bestlem commented 1 year ago

Ok straight-version tells you what version straight is. Mine is out of date.

How do yopu update straight.el? Is it the same as other packages?

raxod502 commented 1 year ago

Yes.