From: Stefan Kangas <stefankangas@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Glenn Morris <rgm@gnu.org>, 14551@debbugs.gnu.org
Subject: bug#14551: compiler fails to track eval-when-compile in required files
Date: Wed, 10 Jan 2024 03:17:05 -0800 [thread overview]
Message-ID: <CADwFkmn+mN0aJh0rP8_Pdt+Spg-wm9oTQ6ZTnbWWZZ91t454CA@mail.gmail.com> (raw)
In-Reply-To: <jwvehciykzu.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 03 Jun 2013 16:59:07 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> foo.el:
>> (require 'lib)
>> (defun foo ()
>> (lib2-func))
> [...]
>> lib.el:
>> (eval-when-compile
>> (require 'lib2))
>> (provide 'lib)
> [...]
>> rm lib*.elc
>> emacs -Q -L . -batch -f batch-byte-compile foo.el
>> produces no warnings.
>
> Yes, that's a long standing bug. Fixing it right is likely to be pretty
> tricky/difficult because it means we need to disregard some of the
> packages already loaded somehow. In the general case, you have the same
> problem even without eval-when-compile, e.g. if you have in lib.el
> a call to an autoloaded macro, in which case the autoloaded package will
> be loaded if lib.el is not yet compiled but not if it is.
>
> The "noruntime" warnings are implemented with a pile of hacks, and I'd
> rather not add to them. So, given that a proper fix looks pretty
> difficult, I wouldn't hold my breath.
Is still an issue 10 years later?
next prev parent reply other threads:[~2024-01-10 11:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 20:30 bug#14551: compiler fails to track eval-when-compile in required files Glenn Morris
2013-06-03 20:59 ` Stefan Monnier
2024-01-10 11:17 ` Stefan Kangas [this message]
2024-01-12 15:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmn+mN0aJh0rP8_Pdt+Spg-wm9oTQ6ZTnbWWZZ91t454CA@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=14551@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).