unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: Reily Siegel <mail@reilysiegel.com>
Cc: 61265@debbugs.gnu.org
Subject: [bug#61265] [PATCH 0/1] Add lint checker for unused module imports.
Date: Sun, 5 Feb 2023 14:09:16 +0100	[thread overview]
Message-ID: <Y9+qfFGAzLKajsFD@jasmine.lan> (raw)
In-Reply-To: <87lelegcbm.fsf@reilysiegel.com>

On Sat, Feb 04, 2023 at 01:42:28AM -0500, Reily Siegel wrote:
> 
> Julien Lepiller <julien@lepiller.eu> writes (guix-devel):
> 
> > Many modules seem to use a lot of imports that are actually useless,
> > for instance (gnu packages heads) imports 20 package modules, but
> > only uses 4 of them.
> >
> > Removing these module imports would help a lot with reducing the number
> > of loops. If anyone wants to volunteer a lint checker for that,
> > raise hands :D
> 
> This is a quick and dirty implementation of such a lint checker. It
> compares the symbols used in a module to those provided by its
> dependencies. If there is a dependency for which none of the symbols
> overlap, a warning is reported. A potential downside of this approach is
> that the lint checker cannot distinguish between lexically scoped
> variables and variables which actually reference another module. This
> has two effects:

Nice!

Off-topic, if you are sending a patch series, be sure to follow the
instructions in the manual section Sending a Patch Series:

https://guix.gnu.org/manual/devel/en/html_node/Sending-a-Patch-Series.html

Otherwise, the ticketing system creates a new ticket for each patch,
like here. Don't worry, I've merged the ticket.




      reply	other threads:[~2023-02-05 13:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04  6:42 [bug#61265] [PATCH 0/1] Add lint checker for unused module imports Reily Siegel
2023-02-05 13:09 ` Leo Famulari [this message]

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://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y9+qfFGAzLKajsFD@jasmine.lan \
    --to=leo@famulari.name \
    --cc=61265@debbugs.gnu.org \
    --cc=mail@reilysiegel.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/guix.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).