From: Jan Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-devel@gnu.org
Subject: Re: [PATCH 0/3] Add '-Wunused-module'
Date: Sun, 12 Feb 2023 19:14:54 +0100 [thread overview]
Message-ID: <874jrq21k1.fsf@gnu.org> (raw)
In-Reply-To: <20230211233234.14425-1-ludo@gnu.org> ("Ludovic Courtès"'s message of "Sun, 12 Feb 2023 00:32:31 +0100")
Ludovic Courtès writes:
Hello,
> The new ‘-Wunused-module’ warning is enabled at ‘-W2’ only. The main
> reason for not enabling it at ‘-W1’ is that in the case of modules used
> at macro-expansion time only, such as (srfi srfi-26), it cannot
> determine whether a module is definitely unused. In this case, the
> compiler reports the module as “possibly unused”, and it is up to the
> programmer to check that claim.
[..]
> Thoughts?
The `possibly undefined' warnings about the srfi-9 gnu, srfi-26 and
curried-definition modules are a bit unfortunate, but easy to check.
It allowed me to trim quite some imports in Dezyne modules.
Very nice!
It seems that only re-exporting a (non-macro) variable from an otherwise
un used module gives a false positive `unused module' warning; it
doesn't even say `possibly unused module'. Not a big problem, but can
anything be done about that?
Greetings,
Janneke
$ git diff --stat
dzn/ast.scm | 3 ---
dzn/ast/display.scm | 3 +--
dzn/ast/equal.scm | 5 +----
dzn/ast/goops.scm | 1 -
dzn/ast/lookup.scm | 1 -
dzn/ast/normalize.scm | 17 ++++++++---------
dzn/ast/parse.scm | 4 ----
dzn/ast/wfc.scm | 1 -
dzn/code.scm | 7 -------
dzn/code/c++.scm | 6 ------
dzn/code/dot.scm | 4 +---
dzn/code/dzn.scm | 7 -------
dzn/code/json.scm | 4 +---
dzn/code/makreel.scm | 6 +-----
dzn/commands/code.scm | 3 +--
dzn/commands/graph.scm | 3 +--
dzn/commands/lts.scm | 4 +---
dzn/commands/parse.scm | 4 ----
dzn/commands/simulate.scm | 3 +--
dzn/commands/traces.scm | 4 +---
dzn/commands/verify.scm | 5 +----
dzn/explore.scm | 4 ----
dzn/indent.scm | 8 +-------
dzn/lts.scm | 3 +--
dzn/parse/peg.scm | 5 +----
dzn/peg.scm | 3 +--
dzn/script.scm | 4 +---
dzn/simulate.scm | 2 --
dzn/templates.scm | 4 +---
dzn/verify/constraint.scm | 4 +---
dzn/verify/pipeline.scm | 2 --
dzn/vm/compliance.scm | 1 -
dzn/vm/evaluate.scm | 3 +--
dzn/vm/report.scm | 1 -
dzn/vm/run.scm | 4 +---
dzn/vm/step.scm | 2 --
dzn/vm/util.scm | 4 +---
test/dzn/dzn.scm | 6 +++---
test/dzn/language.scm | 11 ++++++-----
test/dzn/normalize.scm | 5 ++---
test/dzn/silence.scm | 3 +--
41 files changed, 41 insertions(+), 133 deletions(-)
--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
next prev parent reply other threads:[~2023-02-12 18:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230203181126.5ee4003c@tachikoma.lepiller.eu>
2023-02-11 23:32 ` [PATCH 0/3] Add '-Wunused-module' Ludovic Courtès
2023-02-11 23:32 ` [PATCH 1/3] Add -Wunused-module Ludovic Courtès
2023-02-11 23:32 ` [PATCH 2/3] Add 'record-case' to '.dir-locals.el' Ludovic Courtès
2023-02-11 23:32 ` [PATCH 3/3] Remove unnecessary module imports Ludovic Courtès
2023-02-12 18:14 ` Jan Nieuwenhuizen [this message]
2023-02-20 10:51 ` [PATCH 0/3] Add '-Wunused-module' Ludovic Courtès
2023-02-24 16:00 ` Ludovic Courtès
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/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jrq21k1.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=guile-devel@gnu.org \
--cc=ludo@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.
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).