unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Stephen Gildea <stepheng+emacs@gildea.com>
Subject: Re: master 11860f8: * test/src/comp-tests.el: Eliminate byte-compiler warnings (Bug#52105).
Date: Fri, 26 Nov 2021 12:27:46 -0500	[thread overview]
Message-ID: <jwvv90e7rw4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20211126165429.C9F2F20983@vcs0.savannah.gnu.org> (Stephen Gildea's message of "Fri, 26 Nov 2021 11:54:29 -0500 (EST)")

> +(eval-when-compile
> +  (require 'cl-lib)
> +  (require 'comp))
> +(eval-and-compile
> +  (require 'comp-cstr)          ;in eval-and-compile for its defstruct
> +  (defconst comp-test-src (ert-resource-file "comp-test-funcs.el"))
> +  (defconst comp-test-dyn-src (ert-resource-file "comp-test-funcs-dyn.el"))
> +  (defconst comp-test-pure-src (ert-resource-file "comp-test-pure.el"))
> +  (defconst comp-test-45603-src (ert-resource-file "comp-test-45603.el"))
> +  ;; Load the test code here so the compiler can check the function
> +  ;; names used in this file.
> +  (load comp-test-src nil t)
> +  (load comp-test-dyn-src nil t)
> +  (load comp-test-pure-src nil t)
> +  (load comp-test-45603-src nil t))

This looks pretty ugly, in my book.

Were the warnings false positives or were they diagnosing real problems?

The cleanup could start by moving the (require 'comp-cstr) outside of
the `eval-and-compile` since toplevel `require`s are processed both at
compile and run time anyway.


        Stefan




       reply	other threads:[~2021-11-26 17:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211126165428.32132.80341@vcs0.savannah.gnu.org>
     [not found] ` <20211126165429.C9F2F20983@vcs0.savannah.gnu.org>
2021-11-26 17:27   ` Stefan Monnier [this message]
2021-11-27  4:24     ` master 11860f8: * test/src/comp-tests.el: Eliminate byte-compiler warnings (Bug#52105) Stephen Gildea
2021-11-27 15:11       ` Stefan Monnier

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=jwvv90e7rw4.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=stepheng+emacs@gildea.com \
    /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).