From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EGTfKdPA2GCTNQEAgWs5BA (envelope-from ) for ; Sun, 27 Jun 2021 20:17:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id vdduJdPA2GCJEgAAbx9fmQ (envelope-from ) for ; Sun, 27 Jun 2021 18:17:55 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D20E91C89B for ; Sun, 27 Jun 2021 20:17:54 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 5FF4329103; Sun, 27 Jun 2021 14:17:50 -0400 (EDT) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by mail.notmuchmail.org (Postfix) with ESMTPS id 1CB2429089 for ; Sun, 27 Jun 2021 14:17:47 -0400 (EDT) Received: by mail-wr1-x436.google.com with SMTP id l12so17073612wrt.3 for ; Sun, 27 Jun 2021 11:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/b/iHrClqn0xd2MXqz/nAhROLE/yklws0udrKzzrne4=; b=uqiA8ZaaMGNeESvoqHY39W9T1VUAe33apt/n1cBkNtwoVNDFNg0z7rLB1PxUI7e+3z 5T5iUgzYYRsTR43Li3fLwdARiUDnFOmkURTq+1jSgdbgxqxGPUOGTOgJCti5bJjydNi4 YGrX4/GwUIOj8rYgh96+XkrpDPRs95tPJRHxvfzJ496MXMAEBfKd9yB/Ye2jpjpxi9RC Mhm0H3tI57vEQ5qovxfXIkD50Xvb3CQJK3k6JHyLcpl/Kle9hzHsscwMIZKXkbAbu9SL YoLcQkH0CdlNCzcXAE+79Yr3Yz20/OlFH6lOS7UyAcocyB3X5RP2I7FV9Xjor8XwTFbq 8gQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/b/iHrClqn0xd2MXqz/nAhROLE/yklws0udrKzzrne4=; b=QauIYBJM3LmcPO0o24yhCpSu7qxa/tmIsgVGh6Ij3is1/Y1+oUe1YoMhM4W4lj+i/c tqNrutYZ5J3yMKn/HG0QoF3/x0IuqkgzJSTKsxmwuzaB4uLDAFANovHzHhKLQBVjjsAT zIt7EziZMivfpbtXim7FdB1daiLiMNr6tBd4ltMqjHlpeCSbOAQxx0WHwKMT6NGdEuFB bu6dExQ2eAGg174e1Y7LJP5HadUAbAc1l7nJwrjh5KECS/PqkRgZFVQi9z+XLUpVO3Si 0Lg4DzGSCCuJG4MUGVEtIOi+D36SuR4ZVMY8LNuZvWNOM/wgKS/JDohCUdoFKe909uPL RmQw== X-Gm-Message-State: AOAM530KjXdy+iT5IXBlf/fbEYDdgrGxJ4AgI/RxDfwP0gKgc6qY2esE aXnDauGvjXajTsmCP9s7kvvhrUcKiQx4cad/Z5tEfVWAj7VcLA== X-Google-Smtp-Source: ABdhPJyaM0/kgFY1hvk3L+GOhswZ6WHm/6IJCV7F5VYRarQ0gEiHqza2FrAzestOvUybrOy/bpRZmMB/OVz8hL/mFBg= X-Received: by 2002:a5d:61cd:: with SMTP id q13mr22873187wrv.84.1624817865928; Sun, 27 Jun 2021 11:17:45 -0700 (PDT) MIME-Version: 1.0 References: <20210604032901.3815539-1-felipe.contreras@gmail.com> <20210604032901.3815539-2-felipe.contreras@gmail.com> <875yxz18z4.fsf@tethera.net> In-Reply-To: <875yxz18z4.fsf@tethera.net> From: Felipe Contreras Date: Sun, 27 Jun 2021 13:17:35 -0500 Message-ID: Subject: Re: [PATCH 1/3] ruby: add new Database.open_with_config To: David Bremner Message-ID-Hash: UNBX7757XY5HKVNQI4FLX7VQXE32CIVN X-Message-ID-Hash: UNBX7757XY5HKVNQI4FLX7VQXE32CIVN X-MailFrom: felipe.contreras@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: "notmuch@notmuchmail.org" X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624817875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=NUmCabT3TgA+SDnsoKTsxqN0MKxatN9uS21k1GifZF0=; b=Nkd9Vc3D4sjsSDBu12wgmqO6ZXUbBSBS9ShUwBZmVQ1M03SCwiVNeIW7ZtJz74SQImhPnm aDqhA/juG908d8wGTecKGAMU9oBsF6xbQY/EABcb+kVDoTIoR0jGHYykC1YsqMbbJkfRol MdWJrbvs6uA03d3AXvZj5d+9c5XFA/M0w+Nqkot6EZBEbbC8x09DnpQHYehq3qMqBIS+QQ ooF9A4vz6aXFmVtDU+sVETnb77COr3b9O1r4GwnNvOJF63QEHpjlN+CuhrhU+DyAClJanV lLmxBD2ZlYPtrAq+BqcVdc+0UwrtaKYLXzH15k0ywbfNF036unRI5tVLPIIG6g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624817875; a=rsa-sha256; cv=none; b=QvIEePch10qYxaI1fWft76D5T6+3cvJ8q6v9bJGjwjhwQQ72q4R0ZL/v4qxwwJVEOcWZXQ r4GwPmWNsDU1pl4ZVR5mZ2nNz25FoqSao2gAg56pcBAikAP+9dNjtU0W7mJ4+zdz1ZPdnz Vf/ahSOoyVHrkdj02D5oGF0ycZMcSKY/550ejv2DoLn6b9zK65Qflh97DgxXiOwVE4OAc6 1PtpcZT+Pw+nWZJey6gnQWFXma9VXBXyC2AizkrbiWDM9QpdCJygRTG7Ma27cyx/eUKAge YSlSGrXDJHUurvOWoNIeWQn3TEEkB9rY95MOtWJsvtyfcekOhLuuL8WENx1bcA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=uqiA8Zaa; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=uqiA8Zaa; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: D20E91C89B X-Spam-Score: -0.92 X-Migadu-Scanner: scn1.migadu.com X-TUID: KuAEsSqfUkY1 On Sun, Jun 27, 2021 at 1:02 PM David Bremner wrote: > > Felipe Contreras writes: > > > + ret = notmuch_database_open_with_config (database_path, mode, > > + config_path, profile, &db, > > + NULL); > > I'm curious why you ignore the error_message ouput parameter. Of course > it's valid and supported for library users to do this, but this way > there is no way for users of the ruby bindings to retrieve the > additional information about the error. Particularly in the case of > Xapian exceptions, this can be helpful for debugging. Because the patch is complex enough as it is. It shouldn't be that difficult to add a new notmuch_rb_status_raise function that takes an error message and produces a proper Ruby exception with that message, but that should be done in a separate patch. -- Felipe Contreras