unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Glenn Morris <rgm@gnu.org>
Cc: 14551@debbugs.gnu.org
Subject: bug#14551: compiler fails to track eval-when-compile in required files
Date: Mon, 03 Jun 2013 16:59:07 -0400	[thread overview]
Message-ID: <jwvehciykzu.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <6m8v2r6ios.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 03 Jun 2013 16:30:27 -0400")

> 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.


        Stefan





  reply	other threads:[~2013-06-03 20:59 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 [this message]
2024-01-10 11:17   ` Stefan Kangas
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=jwvehciykzu.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=14551@debbugs.gnu.org \
    --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).