use-package icon indicating copy to clipboard operation
use-package copied to clipboard

Some warnings triggered by auto-package-update.

Open hongyi-zhao opened this issue 4 years ago • 6 comments

According to the guide given here, I use the following settings in my ~/.emcas.d/init.el:

;;Enable use-package-always-ensure if you wish this behavior to be global for all packages:
(require 'use-package-ensure)
(setq use-package-always-ensure t)

;;NOTE: :ensure will install a package if it is not already installed, but it does not keep it up-to-date. 
;;If you want to keep your packages updated automatically, one option is to use auto-package-update, like
(use-package auto-package-update
  :config
  (setq auto-package-update-delete-old-versions t)
  (setq auto-package-update-hide-results t)
  (auto-package-update-maybe))

But when I start emacs, I meet there are some warning have been triggered by the above settings as shown below:

Leaving directory ‘/home/werner/.emacs.d/elpa/auto-package-update-20200826.2227’

Compiling file /home/werner/.emacs.d/elpa/auto-package-update-20200826.2227/auto-package-update.el at Mon Dec 14 10:23:10 2020
Entering directory ‘/home/werner/.emacs.d/elpa/auto-package-update-20200826.2227/’

Compiling internal form(s) at Mon Dec 14 10:23:24 2020
Warning (bytecomp): reference to free variable ‘apu--package-installation-results’
Warning (bytecomp): assignment to free variable ‘apu--package-installation-results’
Warning (bytecomp): reference to free variable ‘quelpa-cache’
Warning (bytecomp): the function ‘quelpa-read-cache’ is not known to be defined.

Are they harm?

Regards, HY

hongyi-zhao avatar Dec 14 '20 02:12 hongyi-zhao

reference to free variable ‘quelpa-cache’ warning message is on my mind. please try again clean init.el and please tell use whole repro step?

conao3 avatar Feb 22 '21 11:02 conao3

please try again clean init.el and please tell use whole repro step?

Not quite sure what you expect me to do. Sorry for my poor English comprehension ability.

hongyi-zhao avatar Feb 23 '21 00:02 hongyi-zhao

No, I'm sorry. My English is usually broken, but I think it's better. But this time it's especially terrible.

Anyway, all I want is to please tell us to reproduce steps on your issue more clearly.

Sample, I tried,

  1. save below snippet as ~/.debug.emacs.d/use-package-auto-package-update/init.el
;;; init.el --- Sample clean init.el  -*- lexical-binding: t; -*-

;; ~/.debug.emacs.d/use-package-auto-package-update/init.el

;; you can run like 'emacs -q -l ~/.debug.emacs.d/use-package-auto-package-update/init.el'
(eval-and-compile
  (setq user-emacs-directory
        (expand-file-name (file-name-directory (or load-file-name byte-compile-current-file buffer-file-name)))))

;;;; use-package bootstrap code; https://github.com/jwiegley/use-package#package-installation

;; ;; This is only needed once, near the top of the file
;; (eval-when-compile
;;   ;; Following line is not needed if use-package.el is in ~/.emacs.d
;;   (add-to-list 'load-path "<path where use-package is installed>")
;;   (require 'use-package))

(eval-and-compile    ; install use-pacakge and initialize package.el in compiler time
  (custom-set-variables
   '(package-archives '(("org"   . "https://orgmode.org/elpa/")
                        ("melpa" . "https://melpa.org/packages/")
                        ("gnu"   . "https://elpa.gnu.org/packages/"))))
  (package-initialize)
  (unless (package-installed-p 'use-package)
    (package-refresh-contents)
    (package-install 'use-package)))

;;;; https://github.com/jwiegley/use-package#package-installation

;; Enable use-package-always-ensure if you wish this behavior to
;; be global for all packages:
(require 'use-package-ensure)
(setq use-package-always-ensure t)

;; NOTE: :ensure will install a package if it is not already
;; installed, but it does not keep it up-to-date.  If you want to
;; keep your packages updated automatically, one option is to use
;; auto-package-update, like
(use-package auto-package-update
  :config
  (setq auto-package-update-delete-old-versions t)
  (setq auto-package-update-hide-results t)
  (auto-package-update-maybe))

(use-package company)
(use-package evil)
(use-package adaptive-wrap)
;; ...
  1. invoke emacs via emacs -q -l ~/.debug.emacs.d/use-package-auto-package-update/init.el
  2. the Emacs works well.

conao3 avatar Feb 23 '21 02:02 conao3

Thanks a lot for your clarification. I'll try and feedback necessary questions.

BTW, why do you still want to create yet another Emacs package manager considering that there are already so much popular wheels in this field?

hongyi-zhao avatar Feb 23 '21 03:02 hongyi-zhao

Just interest. the another Emacs package manager is my first Emacs-lisp project.

conao3 avatar Feb 23 '21 03:02 conao3

I tried exactly according to your instructions with your above code and Emacs works well. But it will be better if we use a list to store the packages list instead of invoking use-package command line-by-line for each package.

hongyi-zhao avatar Feb 23 '21 08:02 hongyi-zhao

It seems like everything was resolved here, so I'm closing this issue. If that understanding is wrong, please report back and we can consider reopening. Thanks.

skangas avatar Nov 13 '22 19:11 skangas