From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Skyler via "Developers list for Guile, the GNU extensibility library" Newsgroups: gmane.lisp.guile.devel Subject: Removing program-arities export Date: Sun, 29 Dec 2024 11:16:30 +0000 Message-ID: Reply-To: Skyler 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="25512"; mail-complaints-to="usenet@ciao.gmane.io" To: "guile-devel@gnu.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Dec 29 12:17:15 2024 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 1tRrII-0006UN-GP for guile-devel@m.gmane-mx.org; Sun, 29 Dec 2024 12:17:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRrHw-0000Ry-MQ; Sun, 29 Dec 2024 06:16:52 -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 1tRrHt-0000R4-7c for guile-devel@gnu.org; Sun, 29 Dec 2024 06:16:49 -0500 Original-Received: from mail-4325.protonmail.ch ([185.70.43.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRrHl-0002Kk-NY for guile-devel@gnu.org; Sun, 29 Dec 2024 06:16:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735470993; x=1735730193; bh=EMzzSBZbZBkKSgl/2mcFuk1qoefCvKIqERiIhpxTeRw=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=D+jtNKBo8h6GD5H0v/RjLxBoTY0i+ab774ALCpcYp0NF4oKmrUuFMOjP5RKgkalB3 eJYDx140YmqDSDKIi4OFTT8LIc5v4B7BjyzC213xlXyGAjgkNx94bAtgMoS6+0k9Z8 nhoFrYcFe9MSgECZ76mG9EsMGrDbbrSrbhL73W3FkdyIwai5IpQ/TOqt7bGEhWYNAn rjZZsLE4BVWrvTj2UP0zEPJJvyGAoLIHJo5TdRI1TMjyFFs+7PZ6e4h9sAtx19tRKB 6NvQcFRbgN4bjteNxMWcX7vKM4aKHnFN6zRdQl0spkzq3KMi26Z9sjSCZ1L6UShMmx wNAUvGqv+99cg== Feedback-ID: 40635331:user:proton X-Pm-Message-ID: 7131540f51c2b2c075144304472b60cae89bf4a0 Received-SPF: pass client-ip=185.70.43.25; envelope-from=skyvine@protonmail.com; helo=mail-4325.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:22859 Archived-At: Hello, I am working on a patch for a bug I recently found in guile. The `program-a= rities` function is exported from the `(system vm program)` module and docu= mented in the manual, but it is no longer defined (it was removed in commit= 1c33be992e8120abd20add8021e4d91d226f5b6a). It is only used in the `progra= m-arity function`, which is not called anywhere in the Guile repository (an= d calling it with valid inputs results in an error due to the `program-arit= ies` being undefined). See the shell session at the end of this email for d= etails. Removing those functions is simple, but the `arity:` accessors have more us= ers, and since they're just pattern-matching on a list I'm concerned that t= hey have been used for the new functions (eg, find-program-arity) so I'm no= t sure if it's safe to just remove them. In particular, `arity->arguments-a= list` uses them unconditionally. However, `arity->arguments-alist` only has= two callers, `program-arguments-alist` and `program-arguments-alists` (tha= t'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 t= he `primitive-code?` predicate. These functions are called from a few diffe= rent 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-co= de?`, if that is no longer in use, and leaving the rest of the function int= act). In solidarity, Skyler user@foreign-guix /d/shm> cat channels.scm %default-channels user@foreign-guix /d/shm> guix time-machine --channels=3D./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. = =20 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. = =20 Enter `,help' for help. scheme@(guile-user)> (module-variable (resolve-module '(system vm program))= 'program-arities) $1 =3D #> 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.