From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Taylan Kammer Newsgroups: gmane.lisp.guile.bugs Subject: bug#72365: srfi-64: test-on-bad-end-name-simple is not allowed to raise an exception Date: Mon, 30 Sep 2024 15:24:15 +0200 Message-ID: <2a1fc413-ccd8-470a-9088-6d06386f32ec@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10076"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Tomas Volf <~@wolfsden.cz>, 72365@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Sep 30 15:26:48 2024 Return-path: Envelope-to: guile-bugs@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 1svGQK-0002OH-75 for guile-bugs@m.gmane-mx.org; Mon, 30 Sep 2024 15:26:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svGQ4-0008LV-1h; Mon, 30 Sep 2024 09:26:32 -0400 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 1svGQ1-0008LM-L7 for bug-guile@gnu.org; Mon, 30 Sep 2024 09:26:30 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svGQ1-0001oh-CV for bug-guile@gnu.org; Mon, 30 Sep 2024 09:26:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=Z3tTyhoOtbUcbFiq0KwbIljYNQHA0rYNnTF1HFkyaQY=; b=R+58Li+1jNUSnN8SMyIs7/6JMY8dpemmUpyLWp9KAa4WFIILD7js+6Nwv9Cf6Rz7ObCv+MKK+ap25hRNFxuEOzVqxZ/YtRgPVZrcztm2yoNBGWKu/P7cIJvs4XOK3Lk63z1DaB7xeFqIZ3Qo3zZ36D+Jcsmxx/PL9Lm3wnYL+LYQ4sMythvLb3pNnf4MATwDD8BVEHV47ap7oZ3NhErRUr0AaEdK4tsfr69ohhDDD0qZNWKZGJ4he5FuQx/G7vg87T4NYGPby4eQr28OvMJJVwiOpnAz/k7XBXdVwUPglUbheQrdI13LKLiSb9WuyPR+euOYzjtxuUYOU9IJCo18JQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svGQX-0004yr-Mc for bug-guile@gnu.org; Mon, 30 Sep 2024 09:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Taylan Kammer Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 30 Sep 2024 13:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72365 X-GNU-PR-Package: guile Original-Received: via spool by 72365-submit@debbugs.gnu.org id=B72365.172770276519115 (code B ref 72365); Mon, 30 Sep 2024 13:27:01 +0000 Original-Received: (at 72365) by debbugs.gnu.org; 30 Sep 2024 13:26:05 +0000 Original-Received: from localhost ([127.0.0.1]:45020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svGPc-0004yE-Mb for submit@debbugs.gnu.org; Mon, 30 Sep 2024 09:26:05 -0400 Original-Received: from mail-ej1-f50.google.com ([209.85.218.50]:40942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svGPX-0004xt-9G for 72365@debbugs.gnu.org; Mon, 30 Sep 2024 09:26:02 -0400 Original-Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a8a7dddd2aaso47665966b.3 for <72365@debbugs.gnu.org>; Mon, 30 Sep 2024 06:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727702660; x=1728307460; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=Z3tTyhoOtbUcbFiq0KwbIljYNQHA0rYNnTF1HFkyaQY=; b=jEpoIk5XDORH8fh122a0lCLc1IMM9lazomF75mIy7q6vfFk/+KZ6YAyrfBD55/1uBA Z01dvLemtlwesLafKmk0LTqNsNTTSA8mcZzwuAjZKmKeXmMVJkU03q4bFJSMVw5pjwFc hHg7FdFfG/KSnft8kPh4ckItXfErxvDtaisOE40fpxp6g2jdR60eRm4z30GYgyl46wgW f1dyh+VMV43wrPHcgdQ46TlJVbR9zvctuLrjW4bjEjZpCwcOiEqmulvpPeEHS+ctILi/ 5J80cDwh8w9AHh3gqfnWNpKludIHrbOlz27AmPaaurK33M34BaAMR35vtVsbsuCHQWbJ XjzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727702660; x=1728307460; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z3tTyhoOtbUcbFiq0KwbIljYNQHA0rYNnTF1HFkyaQY=; b=Z5UjCC8oU9M+UfQW1whtDXoI2r1k3+KYiqRW/mOFVAeVy6JUhaqIxeHYVPKobrFo+V 5LyxRzjkU8itYUfRgIuNnhfJX48wFQYPCypK6DFmv49wlQr/PQ4A+9icTNHUKmuVkP3i 822k7LEtjaHPX8NZKi0j2ZQdZd3e/MqolKod5Z3EITRn3PdAruLMUlKXUAPT3ixY5UAI Y4rlDNxIGLumwIXzMi2lBk/iNKy+z0CaN3/QwEhGvX/rZ2W911WRwiOPTd5ccE984Rpb JVmZnbmKqZYhD9DrCrmH6Zeg5mKAKUhnRcb6ll2tqq9qZvtzsA5qS4PsHpkEQbqoZKDE J/Nw== X-Forwarded-Encrypted: i=1; AJvYcCXDcWxNJo0zYqjrredx9br5DIEdKZBdW8mNjvdt95uIXciqi+Eusk3bmfynwXUe97iSdC6IcQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxCRX6bep277WkyINHI2Tz+5mlxAnr73DvyMfALLha82EaD7GFE +bhtoozNRx/ewFISI0FKpwRiTaouR0d4FLF/5HX30KbScZi9PgUi X-Google-Smtp-Source: AGHT+IGNgneAYTaje8cRLZzSFIEx/9SMMbK4ucNRPGjArsa5w0yi9YEyM/xEJCLJogzYuHnINuYYOQ== X-Received: by 2002:a17:907:3f26:b0:a72:499a:e5ba with SMTP id a640c23a62f3a-a93d8aa79f0mr422938966b.7.1727702660118; Mon, 30 Sep 2024 06:24:20 -0700 (PDT) Original-Received: from ?IPV6:2003:106:8f04:c300:192e:476d:8ae3:22f2? (p200301068f04c300192e476d8ae322f2.dip0.t-ipconnect.de. [2003:106:8f04:c300:192e:476d:8ae3:22f2]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c27c5ae5sm530984166b.63.2024.09.30.06.24.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Sep 2024 06:24:19 -0700 (PDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10994 Archived-At: On 30.07.2024 21:51, Tomas Volf wrote: > Hello, > > I think I found a bug in (srfi srfi-64) module shipped with GNU Guile. Hi Tomas, Thanks for stress-testing the SRFI 64 spec & implementation and reporting all these discrepancies. :-) Firstly, to reiterate some things I've already mentioned in the thread on bug 71300, just so it goes on record here as well: I have a SRFI 64 implementation of my own. I hope Guile will switch to it eventually because I find the upstream reference implementation to be somewhat unpleasant to work with. (It's monolithic, and not the cleanest code.) Until then, my implementation can be used by following these steps: 1. Cloning this repo:     https://codeberg.org/taylan/scheme-srfis/ 2. Running Guile like so:     GUILE_LOAD_PATH=/path/to/scheme-srfis/guile-srfi-64 guile (Replacing /path/to/scheme-srfis with the actual path to wherein the repo was cloned, of course.) Then, loading SRFI-64 the regular way should load my implementation rather than the one that ships with Guile (which is the reference implementation from the SRFI author). I'll respond to your reports one by one, treating them like bug reports towards my own implementation, since it was originally derived from the reference implementation and has probably inherited some of the bugs. Unfortunately, I'm not motivated to work on the implementation that's in Guile, because I find it too cumbersome to navigate its code and the unclean coding practices too distracting. > The specification says the following about the simple test runner: > >> Creates a new simple test-runner, that prints errors and a summary on the >> standard output port. > It does not mention that it can signal errors, so I believe the following should > just print to the terminal: > > (use-modules (srfi srfi-64)) > (test-on-bad-end-name-simple (test-runner-null) "x" "y") > > However is signals an error instead: > > Backtrace: > In ice-9/boot-9.scm: > 1752:10 6 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) > In unknown file: > 5 (apply-smob/0 #) > In ice-9/boot-9.scm: > 724:2 4 (call-with-prompt ("prompt") # …) > In ice-9/eval.scm: > 619:8 3 (_ #(#(#))) > In ice-9/boot-9.scm: > 2836:4 2 (save-module-excursion #) > 4388:12 1 (_) > In srfi/srfi-64/testing.scm: > 375:14 0 (test-on-bad-end-name-simple _ _ _) > > srfi/srfi-64/testing.scm:375:14: In procedure test-on-bad-end-name-simple: > test-end x does not match test-begin y The spec is very sparse on what the simple test runner does, so I'm not sure if the intention is to imply that it does nothing other than what's stated. In one case, the reference implementation clearly violates the specification: The simple test runner uses the `aux` field which the spec claims it doesn't use. (My implementation fixes this.) However, in this case it's not that clear-cut. In this case, I think raising an error is good default behavior, since the mismatched end name indicates a problem with the test suite itself rather than the code being tested. If it poses a problem to the user, one can override that callback with the `test-runner-on-bad-end-name!` setter. What do you think? - Taylan