From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4NQrEGqxvmDp2AAAgWs5BA (envelope-from ) for ; Tue, 08 Jun 2021 01:53:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YIlgC2qxvmCRfwAAB5/wlQ (envelope-from ) for ; Mon, 07 Jun 2021 23:53:14 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 C01812BFE7 for ; Tue, 8 Jun 2021 01:53:13 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D6F162903E; Mon, 7 Jun 2021 19:53:08 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 2D1011FFD8 for ; Mon, 7 Jun 2021 19:53:06 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 0A9585FD25; Mon, 7 Jun 2021 19:53:06 -0400 (EDT) Received: (nullmailer pid 194802 invoked by uid 1000); Mon, 07 Jun 2021 23:53:04 -0000 From: David Bremner To: Felipe Contreras Subject: Re: [PATCH 3/3] test: ruby: simplify basic tests In-Reply-To: References: <20210501120448.484082-1-felipe.contreras@gmail.com> <20210501120448.484082-4-felipe.contreras@gmail.com> <87zgwlr5pw.fsf@tethera.net> Date: Mon, 07 Jun 2021 20:53:04 -0300 Message-ID: <87pmwxfd0f.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: Z7UQJP2HCGQ525OME6ERSTD6OIAAGTGK X-Message-ID-Hash: Z7UQJP2HCGQ525OME6ERSTD6OIAAGTGK X-MailFrom: david@tethera.net 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" , Ludovic LANGE , Stefano Zacchiroli 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=1623109993; 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; bh=xOE1TrHdognPweWd3c4dpHNKvgBDbh1uQ605qDAb37I=; b=CDsRNON2DQf2+ebxnLKquUZIacUkXqlrHoDi41VFwAcCYAp4uQIvUjMlh1VB/5CqhPaYxr l/DKrJbfdRxC4SUKZ1TwcKF7ffmWqAuZh6UwoRKiaVd4ozBwLbeM/PYHfJSUOfhU9sxvq7 B06w6ET+mzMg0Qkauqt5g08/nHen3gpyfjGhQSkRx4wy/FxAoZ5ZJ+KXJNuwfBGfHKKpe1 Vn4wkuPBW3PZ0brdTuuw+XrHKD/kyiWK4TmkrBXHwJYqnjz5xuTGcQh8Xpr2jVbq6JWY6e OZkQ0CAb+z/zaCYyuzL5St1Hi/+6ugcuMrEabv0PuW6QvUfLLIFUpiG5uhPKKg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623109993; a=rsa-sha256; cv=none; b=mVLN59w25iqjcVHe6UgPlfOFuSc5DXrcEhrKthYKLdc5Jl4ZV+Wq7sq/qBaymr6OCpshcH ZCxjBwi70xNpgg/syFUD7Nc3DDt5VaDBNOczvf+G6y7ox4fDuPesCDonO8XJxv99Ec7R38 RDLZB38eTl40T6Q7d1bnPM7l8tgCU2GiTkvUjX6R29O0MyWW5HMC6/rT1qdBFEscTnxhqD epXtdeIJ6udjrTSkVNri/VoY2/6v4tGd7Ne24k2ZlIhEmIEan87Fbfr0EVnLAioVVEvQqr o7Ww8wtQIWViPXqIG8N478iNx+/flbWbNYrqYNZDUOtgH1Zyr9rm5rzUdFc0Bg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.52 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: C01812BFE7 X-Spam-Score: -0.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: pnjipI7aeOqt Felipe Contreras writes: >> >> Is this assuming that the sort order in the CLI is the same as in the >> library / bindings? that seems a bit fragile if so. > > Both the CLI and the bindings are using the same libnotmuch library. > If neither of them specify a sort order, the default sort order of > libnotmuch would be used (I presume). Exactly the same order I would > get if I write a C program that uses libnotmuch and doesn't specify > any order. > > Why would the CLI specify an order the user didn't specify to libnotmuch? I guess the point is that the CLI is not required to track the library precisely, so even if it is a bit theoretical, this change does introduce some fragility / technical debt into the test suite. For better or for worse, the API does not document a default sort order, so assuming any particular sort order is probably a mistake. I can imagine a future database backend where the "UNSORTED" order is actually non-deterministic. If we were to document a default sort order, UNSORTED might make the most sense as a default, as it's the highest performance (more or less by definition).