GNU bug report logs - #61802
29.0.60; Packages supporting "package.el" throw comp warnings when package.el not loaded

Previous Next

Package: emacs;

Reported by: Chris Brolly <Chris.Brolly <at> building-controls.com>

Date: Sun, 26 Feb 2023 08:31:02 UTC

Severity: normal

Tags: notabug

Found in version 29.0.60

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 61802 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Chris Brolly <Chris.Brolly <at> building-controls.com>, 61802 <at> debbugs.gnu.org
Subject: Re: bug#61802: 29.0.60; Packages supporting "package.el" throw comp
 warnings when package.el not loaded
Date: Sun, 1 Oct 2023 05:36:38 -0700
tags 61802 notabug
close 61802
thanks

Chris Brolly <Chris.Brolly <at> building-controls.com> writes:

> When packages are built (using straight-use-package) with native-comp
> enabled, many result in the warning such as the one resulting from magit
> being compiled below:
>     Warning (comp): magit-section-pkg.el:1:2: Warning: the function
>             'define-package' is not known to be defined.
>     Warning (comp): git-commit-pkg.el:1:2: Warning: the function
>             'define-package' is not known to be defined.
>     Warning (comp): magit-section-pkg.el:1:2: Warning: the function
>             'define-package' is not known to be defined.
>     Warning (comp): magit-pkg.el:1:2: Warning: the function
>             'define-package' is not known to be defined.
> This will happen after the initial straight.el build process is
> completed.
> I've tried to cut this down, but i was unable to replicate it without
> straight.el. Just using use-package on its own with another package was
> unsuccessful.
>
> (unless (featurep 'straight)
>   ;;(setq straight-repository-branch "rr-fix-renamed-variable")
>   (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))
>   (setq my-straight-pkgs
>         '((use-package :type git :host github :repo "jwiegley/use-package")
>           (magit :type git :host github :repo "magit/magit")))
>   (dolist (pkg my-straight-pkgs)
>     (straight-use-package pkg)))
>
> Once run, the warnings begin to pile up over the next few
> minutes. Nothing else untoward seems to happen, but I was recommended to
> report this so here I am.

This is a bug in straight.el, which seems to be compiling "foo-pkg.el"
files.  It should not do that.  I recommend reporting this bug to the
straight.el maintainers.  Meanwhile, I'm closing this bug.

Thanks.




This bug report was last modified 1 year and 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.