From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jan Nieuwenhuizen Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH 0/3] Add '-Wunused-module' Date: Sun, 12 Feb 2023 19:14:54 +0100 Organization: AvatarAcademy.nl Message-ID: <874jrq21k1.fsf@gnu.org> References: <20230203181126.5ee4003c@tachikoma.lepiller.eu> <20230211233234.14425-1-ludo@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22291"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: guile-devel@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Feb 12 19:15:20 2023 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRGsi-0005az-Hk for guile-devel@m.gmane-mx.org; Sun, 12 Feb 2023 19:15:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRGsQ-0004pZ-3u; Sun, 12 Feb 2023 13:15:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRGsO-0004oc-DJ; Sun, 12 Feb 2023 13:15:00 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRGsM-0007aW-Bh; Sun, 12 Feb 2023 13:14:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=FMOgo02rVYoHjBa548dAgrehY3z132FpWL8XSsk+6lg=; b=P053dgrg/N3DOZyEoF26 H+iL6rjxuJLo2kIH7uqaktyoc44X7zETzEF8eq2qn+q/ZCzsGxFoB7rrPfLOti9ohquvHTvLDILSo KjPpfNJtNTK3EkqMxocIf4GiUnWFaxfFL7xF3tQvBzdf4sPfZDjDDLEke3AykuKVSzk7SA0TyuFhg zSjaAgm/snsJnhEHeEWgFcySYHcjqJvuIxhHI2LA3lZxL+plCp7pwmwLGEmAYmWTzRtQGyH0oQtHc 7LTQ47eH+TRbKQadZak3yz03lRGBNbrSBpPfebgZXO49Ts6iB97+WmdSKn/MS3KGrIVwjojjKm1wd 34Ljwz31Kwawsg==; Original-Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRGsL-00087M-IV; Sun, 12 Feb 2023 13:14:57 -0500 Original-cc: dezyne-devel@nongnu.org X-Url: http://AvatarAcademy.nl In-Reply-To: <20230211233234.14425-1-ludo@gnu.org> ("Ludovic =?utf-8?Q?Cou?= =?utf-8?Q?rt=C3=A8s=22's?= message of "Sun, 12 Feb 2023 00:32:31 +0100") X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21699 Archived-At: Ludovic Court=C3=A8s writes: Hello, > The new =E2=80=98-Wunused-module=E2=80=99 warning is enabled at =E2=80=98= -W2=E2=80=99 only. The main > reason for not enabling it at =E2=80=98-W1=E2=80=99 is that in the case o= f 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 =E2=80=9Cpossibly unused=E2=80=9D, 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(-) --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com