From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Bozhidar Batsov" Newsgroups: gmane.emacs.devel Subject: Re: [nongnu] elpa/cider ff1de2bd22: [#3113] Hardcode cider-version as a workaround Date: Wed, 29 Dec 2021 09:50:23 +0200 Message-ID: <5e44987f-c7b1-4130-8fc3-29bf0a199380@beta.fastmail.com> References: <164076133315.20367.12022941883015497813@vcs2.savannah.gnu.org> <20211229070213.6826CC002EE@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f76b24e7847847a58061ea045930ca0f Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27852"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-4525-g8883000b21-fm-20211221.001-g8883000b To: "Emacs Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 29 08:52:02 2021 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 1n2Tkd-00070g-Ix for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Dec 2021 08:52:01 +0100 Original-Received: from localhost ([::1]:40970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2Tkb-0000hV-Lp for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Dec 2021 02:51:57 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2Tje-0008ST-MO for emacs-devel@gnu.org; Wed, 29 Dec 2021 02:51:01 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:50685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2Tjc-0007WI-PS for emacs-devel@gnu.org; Wed, 29 Dec 2021 02:50:58 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id CA8115C005A for ; Wed, 29 Dec 2021 02:50:55 -0500 (EST) Original-Received: from imap43 ([10.202.2.93]) by compute5.internal (MEProxy); Wed, 29 Dec 2021 02:50:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=batsov.dev; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm2; bh=GWcZz/Bk9txoAtaFgYNPhJoq9C9k9Ah dWF8ptknrJSY=; b=akfmxyxQIgjjPPVfVpXLVOTpUD93ElfraO05G5lZBRLIEcx lgtor0kaMWRsHnYqXOG7eTC+5OjP1XNUaKl0uRuE1Q1Qt/PR2YhTZ5SocZUeWPxj eWc/s3yk3HI+jIUzGtSVUdowm9CKy7y8hqYxopk+uIGlPmA5XG+gKOhFWq9QgiJ2 zRlnn5lN5/4elljZvU5Leoiyd5dEKSgoJA5V6AhPWn2qbxAL3uwuw7kYX/ZLgsN3 pDtJXQGKC+InRj0P9M6eSrM8d4X9Bik/wlStMJ5JrPBjQP9O1GqzWXCP3yRnAJFJ +WT1yO5moPGOisqoVQiQrH7Zq2h2N0WKYim5y6A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=GWcZz/ Bk9txoAtaFgYNPhJoq9C9k9AhdWF8ptknrJSY=; b=nCl94tdHYoidxQhMC8SRu/ A7lwRgffGTgHP8QjwFuWH2FJgwAosefT2KuTtxBEgUJTyHuWMNnBsuPPQMaLO+Le ep597LBmq9kfxQOAnLdQIYtuCVr2kXDNFqSnSsGLDgh10PH6ZuanbZhLyqDN3hxh 4VD/MwlzDQwcrrA3qVJEsBfLOUQ6cC2nGFAG4vF14a4ioP+0yVK5tkzQ0s82k/DL AvRWNlKR4ieRZ2waSxz3XYLPILRwWAKV2OnPZSa+5FHCvqR1uc9wPrz2JTpq61u0 t0TFBcBO2SnJOec5Q+/Nf3rRykYRrI/x52cSAyzwMHmPOjrzykfx77x3FPgGZMvg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddvtddguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsegrtderreerredtnecuhfhrohhmpedfueho iihhihgurghruceurghtshhovhdfuceosghoiihhihgurghrsegsrghtshhovhdruggvvh eqnecuggftrfgrthhtvghrnhepgedvteefkeekteeilefftdekuddthffffeegtdevhfet feevjefhgfdtkeejieeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepsghoiihhihgurghrsegsrghtshhovhdruggvvh X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 90EC5AC0E90; Wed, 29 Dec 2021 02:50:55 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: Received-SPF: pass client-ip=66.111.4.27; envelope-from=bozhidar@batsov.dev; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:283540 Archived-At: --f76b24e7847847a58061ea045930ca0f Content-Type: text/plain I'm already using `package-get-version` as well, but in case they install from MELPA there's a divergence in the version that I wanted to account for, as MELPA replaces the "real" package version (e.g. 1.2) with a build timestamp. So I end up displaying to the users something like "Version 1.2.0-snapshot (package: 20211219...)" in those cases. Makes it easier for me to debug issues related to snapshot builds. Anyways, thanks a lot for the help! On Wed, Dec 29, 2021, at 9:32 AM, Stefan Monnier wrote: > > [#3113] Hardcode cider-version as a workaround > > > > I can't figure out why the auto-extraction of the version doesn't work. > [...] > > -(defconst cider-version > > - (lm-version (or load-file-name buffer-file-name)) > > +(defconst cider-version "1.2.0" > > "The current version of CIDER.") > > I suspect the problem may be that `load-file-name` will point at > `cider.elc` where `lm-version` won't find what you need. > > You can try and use `package-get-version` (new in Emacs-27) which tries > to get this working. > > > Stefan > > > --f76b24e7847847a58061ea045930ca0f Content-Type: text/html Content-Transfer-Encoding: quoted-printable
I'm already usi= ng `package-get-version` as well, but in case they install from MELPA th= ere's a divergence in the version that I wanted to account for, as MELPA= replaces the "real" package version (e.g. 1.2) with a build timestamp. = So I end up displaying to the users something like "Version 1.2.0-snapsh= ot (package: 20211219...)" in those cases. Makes it easier for me to deb= ug issues related to snapshot builds. Anyways, thanks a lot for the help= !   

On Wed, Dec 29, 2021, at 9:= 32 AM, Stefan Monnier wrote:
>     [#3113] Hardcode cider-ve= rsion as a workaround
>     
>     I can't figure out why the aut= o-extraction of the version doesn't work.
[...]
<= div>> -(defconst cider-version
> -  (lm-version= (or load-file-name buffer-file-name))
> +(defconst cid= er-version "1.2.0"
>    "The current ver= sion of CIDER.")

I suspect the problem may = be that `load-file-name` will point at
`cider.elc` where `= lm-version` won't find what you need.

You c= an try and use `package-get-version` (new in Emacs-27) which tries
to get this working.


        Stefan




--f76b24e7847847a58061ea045930ca0f--