From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Hyatt Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: triples Date: Wed, 2 Nov 2022 22:32:19 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ddd8f205ec87c4a7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37402"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Tom Gillespie To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 03 03:33:11 2022 Return-path: Envelope-to: ged-emacs-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 1oqQ2Y-0009Wi-NY for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Nov 2022 03:33:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqQ20-0001CX-5c; Wed, 02 Nov 2022 22:32:36 -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 1oqQ1y-0001Br-QB for emacs-devel@gnu.org; Wed, 02 Nov 2022 22:32:34 -0400 Original-Received: from mail-yw1-x1129.google.com ([2607:f8b0:4864:20::1129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqQ1w-0001ib-Qe for emacs-devel@gnu.org; Wed, 02 Nov 2022 22:32:34 -0400 Original-Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-368edbc2c18so3421257b3.13 for ; Wed, 02 Nov 2022 19:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LVKzdi16cDBB5w58Xgnzm/Gx/318iZx3+KJ3SVJAlPY=; b=fNDUTy6y+9uPYJS17AH+cAHd1Ny01uIPbTADQgCAMpvzbjRQWvSqU3rRhugYgKp6IW Q9w5yA+tNyHSU31L3S8chhtv+NBlUg4TR3WM1Nn0kyZx+pU5Xg/AwX7e9PAPSrQibzDx G4xS6yZODGV8IitpoiI9o/ZTYpUdQ4U0UoaZXg/EhTladriTj9hlSluVIY8L5yAlJm91 zRgdbsn5XXR3w2YaZIKRJYy9h0GY/z9ABgEYSHZ6K41+YJ9893HjS4/cmuDgaJVatAWh i919tI+rntK4sgJiu/IQLTZIGO/r0Zkqg6ATslWEwJ4pEGvT0ea7fbPbXJxLLuvKc1Da 3Jdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LVKzdi16cDBB5w58Xgnzm/Gx/318iZx3+KJ3SVJAlPY=; b=z4zrFsmqUTwqkaMI9QI7W0guR0nqypOf11DypcR7d10F1axUpxBU31Embp6zxb5upg 3Fwmo9fxmo9Eby2ue/7ROT05QJcg8aY737mprqe5sqyDU8Bd/YkvzTWlC+xqVMY7pAKl B++tH5kZIAI0x9almeCi6ryuOxw+7tjYuF9U292Gw2Ff65Eh9EjdXffCK7DWZgyLFqLD 31nkCaddgaosrAaqSDXwGhWnj21q6ixZLWcVuE2LMDaEp8+u1EMH2xTQmtQq3Q34+KJN 952k7YC8JybNag6gOGz6tZ9AA23kPaef8cWte/Tn82QNT+NRjZ249kLRl4ZQVGUW+MdV CgGQ== X-Gm-Message-State: ACrzQf2mdNkKTLJYoVN+cZxeUYy/1k/XaJAgjrEGelLxwMuLuiOl3Vid 83SmzCXjTr4xB4hDPHdphmnx+Ichr56r4l4HCxE= X-Google-Smtp-Source: AMsMyM7LllDCl5mlhd+/A39q3cvkg6IdOHW7NPMGUGJMwYkgDozfKtnnWyrzss7mv8eqiPJqOmLcbxKO7tZnaebPtIQ= X-Received: by 2002:a81:124a:0:b0:369:f470:39e9 with SMTP id 71-20020a81124a000000b00369f47039e9mr26233425yws.173.1667442751164; Wed, 02 Nov 2022 19:32:31 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1129; envelope-from=ahyatt@gmail.com; helo=mail-yw1-x1129.google.com 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299044 Archived-At: --000000000000ddd8f205ec87c4a7 Content-Type: text/plain; charset="UTF-8" On Thu, Oct 27, 2022 at 11:34 AM Stefan Monnier wrote: > > About the possibility of using one or the other, whichever is available, > how > > would that work in terms of package dependencies? I don't think it's > > possible to have an OR dependency specified in the package-dependencies > > line in the source, but really only one of emacsql or emacs29 would be > > required. If you have any insight into this, it'd be useful. > > Package dependencies just tell the package manager to install other > packages to try and make it easier on users to get a working package. > But you don't need to have a precise/exact description of the > real dependencies in the `Package-Requires` (as long as the > correct byte-compilation of your package actually depends on some other > package, e.g. if your package uses a macro defined in the other package). > > You can just remove the `emacsql` dependency from `Package-Requires` and > replace it with a runtime check for the presence of either `emacsql` or > the new sqlite support that emits an error when applicable (with > a message explaining to the user that they need to have one of those two > thingies before they can use the package). > [ Just make sure the error is not emitted just because the file(s) from > your package are loaded, but only when some code is actually called. ] > This is now done, you can find the new code that can either use emacs 29 builtin sqlite, or emacsql, on a new branch, at https://github.com/ahyatt/triples/tree/combined. > > > Stefan > > --000000000000ddd8f205ec87c4a7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Oct 27, 2022 at 11:34 AM Stefan Monnier <<= a href=3D"mailto:monnier@iro.umontreal.ca" target=3D"_blank">monnier@iro.um= ontreal.ca> wrote:
> About the possibility of using on= e or the other, whichever is available, how
> would that work in terms of package dependencies? I don't think it= 's
> possible to have an OR dependency specified in the package-dependencie= s
> line in the source, but really only one of emacsql or emacs29 would be=
> required.=C2=A0 If you have any insight into this, it'd be useful.=

Package dependencies just tell the package manager to install other
packages to try and make it easier on users to get a working package.
But you don't need to have a precise/exact description of the
real dependencies in the `Package-Requires` (as long as the
correct byte-compilation of your package actually depends on some other
package, e.g. if your package uses a macro defined in the other package).
You can just remove the `emacsql` dependency from `Package-Requires` and replace it with a runtime check for the presence of either `emacsql` or
the new sqlite support that emits an error when applicable (with
a message explaining to the user that they need to have one of those two thingies before they can use the package).
[ Just make sure the error is not emitted just because the file(s) from
=C2=A0 your package are loaded, but only when some code is actually called.= =C2=A0 ]

This is now done, you can find= the new code that can either use=C2=A0emacs 29 builtin sqlite, or emacsql,= on a new branch, at https://github.com/ahyatt/triples/tree/combined.=C2=A0
=
=C2=A0