From: Skyler via "Developers list for Guile, the GNU extensibility library" <guile-devel@gnu.org>
To: "guile-devel@gnu.org" <guile-devel@gnu.org>
Subject: Removing program-arities export
Date: Sun, 29 Dec 2024 11:16:30 +0000 [thread overview]
Message-ID: <WZp-Z-HhbASpn9zmycHpyPermX68RQKZqs5PKrA0-UjcfEhjaZJm7Y6ZjMxsxVoUlUMMz60Eq3IYuOV3cc4CaGPVDiZfLtqpStMBHuRP1GQ=@protonmail.com> (raw)
Hello,
I am working on a patch for a bug I recently found in guile. The `program-arities` function is exported from the `(system vm program)` module and documented in the manual, but it is no longer defined (it was removed in commit 1c33be992e8120abd20add8021e4d91d226f5b6a). It is only used in the `program-arity function`, which is not called anywhere in the Guile repository (and calling it with valid inputs results in an error due to the `program-arities` being undefined). See the shell session at the end of this email for details.
Removing those functions is simple, but the `arity:` accessors have more users, and since they're just pattern-matching on a list I'm concerned that they have been used for the new functions (eg, find-program-arity) so I'm not sure if it's safe to just remove them. In particular, `arity->arguments-alist` uses them unconditionally. However, `arity->arguments-alist` only has two callers, `program-arguments-alist` and `program-arguments-alists` (that's not a typo, the second one is pluralized), which call it conditionally. The conditions are different but both require that the given code passes the `primitive-code?` predicate. These functions are called from a few different places so it'll take a little more time to figure out if it's safe to remove them (or possibly just remove the logic conditioned by `primitive-code?`, if that is no longer in use, and leaving the rest of the function intact).
In solidarity,
Skyler
user@foreign-guix /d/shm> cat channels.scm
%default-channels
user@foreign-guix /d/shm> guix time-machine --channels=./channels.scm -- shell --container --nesting guile-next guile-readline
user@foreign-guix /dev/shm [env]$ guix describe
guix 4a4a8c9
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 4a4a8c9d2621d4871c4b9c8857bfb0e6e53d7e56
user@foreign-guix /dev/shm [env]$ guile -q
GNU Guile 3.0.9-0.3b76a30
Copyright (C) 1995-2024 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> (module-variable (resolve-module '(system vm program)) 'program-arities)
$1 = #<variable 734b7c40e940 value: #<undefined>>
scheme@(guile-user)> (use-modules (system vm program))
scheme@(guile-user)> (program-arity car #f)
ice-9/boot-9.scm:1676:22: In procedure raise-exception:
Unbound variable: program-arities
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
reply other threads:[~2024-12-29 11:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='WZp-Z-HhbASpn9zmycHpyPermX68RQKZqs5PKrA0-UjcfEhjaZJm7Y6ZjMxsxVoUlUMMz60Eq3IYuOV3cc4CaGPVDiZfLtqpStMBHuRP1GQ=@protonmail.com' \
--to=guile-devel@gnu.org \
--cc=skyvine@protonmail.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.
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).