all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Mortimer Cladwell <mbcladwell@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Reduce (use-module... to minimally required set
Date: Sun, 27 Feb 2022 20:47:14 -0500	[thread overview]
Message-ID: <87sfs3u5i5.fsf@gmail.com> (raw)
In-Reply-To: <CAOcxjM5=xXB1gPSfNVooaFB-K+-aeMYXg6YiGfxW5nS=-fT3Cg@mail.gmail.com> (Mortimer Cladwell's message of "Thu, 17 Feb 2022 03:12:25 -0500")

Hello Mortimer,

Mortimer Cladwell <mbcladwell@gmail.com> writes:

> Hi,
> I have taken the Artanis packaging recipe from guile-xyz.scm and modified
> it to suit my needs.  For the (use-module... section I simply copied all
> the modules required by guile-xyz.scm.  I suspect Artanis requires a much
> smaller subset. Is there a way to report modules actually used so I can
> reduce the (use-module... statement to the bare minimum?

There are some warnings you can get via 'guild compile'; e.g.:

--8<---------------cut here---------------start------------->8---
$ guild compile -Whelp
The available warning types are:

  `unsupported-warning'  warn about unknown warning types
  `unused-variable'      report unused variables
  `unused-toplevel'      report unused local top-level variables
  `shadowed-toplevel'    report shadowed top-level variables
  `unbound-variable'     report possibly unbound variables
  `macro-use-before-definition' report possibly mis-use of macros before they are defined
  `use-before-definition' report uses of top-levels before they are defined
  `non-idempotent-definition' report names that can refer to imports on first load, but module definitions on second load
  `arity-mismatch'       report procedure arity mismatches (wrong number of arguments)
  `duplicate-case-datum' report a duplicate datum in a case expression
  `bad-case-datum'       report a case datum that cannot be meaningfully compared using `eqv?'
  `format'               report wrong number of arguments to `format'
--8<---------------cut here---------------end--------------->8---
  
'unused-toplevel' is close but seems limited to variables, which modules
aren't apparently.  It'd be a very useful thing to add, indeed!

Maxim


      reply	other threads:[~2022-02-28  1:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17  8:12 Reduce (use-module... to minimally required set Mortimer Cladwell
2022-02-28  1:47 ` Maxim Cournoyer [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

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

  git send-email \
    --in-reply-to=87sfs3u5i5.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=mbcladwell@gmail.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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.