From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#40693: 28.0.50; json-encode-alist changes alist Date: Sat, 23 May 2020 20:40:20 +0100 Message-ID: <87a71ywicb.fsf@gmail.com> References: <87a738jotd.fsf@tcd.ie> <87mu6utxd1.fsf@tcd.ie> <83r1w6ziql.fsf@gnu.org> <82572c3f-fb24-0b01-06ec-47067d9219ca@yandex.ru> <83blnazdly.fsf@gnu.org> <87wo5yqrqo.fsf@tcd.ie> <87ftbyavbq.fsf@tcd.ie> <87zha43ira.fsf@gmail.com> <87367t9ej7.fsf@tcd.ie> <87imgp2atd.fsf@gmail.com> <87sgfs81g6.fsf@tcd.ie> <87eerbybfn.fsf@gmail.com> <87wo52ochm.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="87678"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Cc: darthandrus@gmail.com, 40693@debbugs.gnu.org, Dmitry Gutov To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 23 21:41:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jca17-000MhL-LJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 May 2020 21:41:09 +0200 Original-Received: from localhost ([::1]:59676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jca16-0001CL-N8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 May 2020 15:41:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jca10-0001C9-5y for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 15:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52428) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jca0z-0004p4-St for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 15:41:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jca0z-0001JM-Qz for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 15:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 May 2020 19:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40693 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch Original-Received: via spool by 40693-submit@debbugs.gnu.org id=B40693.15902628314995 (code B ref 40693); Sat, 23 May 2020 19:41:01 +0000 Original-Received: (at 40693) by debbugs.gnu.org; 23 May 2020 19:40:31 +0000 Original-Received: from localhost ([127.0.0.1]:35741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jca0V-0001IV-05 for submit@debbugs.gnu.org; Sat, 23 May 2020 15:40:31 -0400 Original-Received: from mail-wm1-f42.google.com ([209.85.128.42]:52246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jca0T-0001IJ-Kr for 40693@debbugs.gnu.org; Sat, 23 May 2020 15:40:30 -0400 Original-Received: by mail-wm1-f42.google.com with SMTP id r9so1508058wmh.2 for <40693@debbugs.gnu.org>; Sat, 23 May 2020 12:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=7tC6aWKvkSP9QBmB6ELIZofNoFF0HxZd1NUDCmDAoP8=; b=MbokEyLIClx+3VWYme7Q7ZHW48yWOhtUGxpLAYx4U0w4Qq49n+dBBi9W8dvp0ScZOl y2qP/89AdInbKr8a6akFKx6poNa4uwtPWmTH4mt2K/Eu8gR/GGRQ9W9Nb03bx+lt9ucc 8DcjS75JF6yfPIF/YAIvE8U396246MC4OXtKsPk0JzEuJZVedbciNcf3rHgUw0DaCWnY hEgoHpcUgPfiUIx2kC0VgIzuMOIBQHyW19JNf2Okn4YWRoqb76X6paj70tkRZXnRmqQA tPwDPcO7qxQrZt4YnbddTPvgnOuRYGp5WiZxxr/ugjK3BeJTP5vwCPwxvSuWei2XXBvG 1X5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=7tC6aWKvkSP9QBmB6ELIZofNoFF0HxZd1NUDCmDAoP8=; b=m2ZPeSwkFByLoG/TYGPU65SXSqr+kBZV5flY7xRH3WMUpvBsTXv4H6MPOuyEIhvqc2 w9RChab/PAAzzG4OitGUgV/gVFFn572efHbmX1yU+/vGKpNmHU++OMOtg5piJbHtZay5 sADVsOFVKmNjyA0nVhabDT0Zjiv8qKxUipqy0uOYdOIlIse+rUIaKLPnVFLUORaifxS2 KK49HMvzRudfzLJesMS4cNaJETyRuTLFcOBcxR/uhZwBIjcUNy5PAou2cESRwWJGyQ51 pXxN22T9Pm8nKCC4yUe9E8uRRpxh09jZHOFwQplJmkRIhq97Ur/DNdlSVB/6oCBEAEH/ zbSg== X-Gm-Message-State: AOAM532tizEOS97FfbG5NmKVIVWdpFK34+ddBOhsI5vOuRu7ZrNP7kik RNMnPSf3bAN7PP1t/464QTSs2aTG+3U= X-Google-Smtp-Source: ABdhPJxDCXsaEafo+LWa4ub75jMvnEm6jbg5JW7oKJ5FA+JCreH66rV2ZD2DBKIGqtPezzJWE2vvvw== X-Received: by 2002:a05:600c:297:: with SMTP id 23mr19466632wmk.12.1590262823458; Sat, 23 May 2020 12:40:23 -0700 (PDT) Original-Received: from krug ([89.180.159.150]) by smtp.gmail.com with ESMTPSA id z16sm3719584wmf.3.2020.05.23.12.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 May 2020 12:40:22 -0700 (PDT) In-Reply-To: <87wo52ochm.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sat, 23 May 2020 17:13:57 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180843 Archived-At: "Basil L. Contovounesios" writes: > Jo=C3=A3o T=C3=A1vora writes: >> "Basil L. Contovounesios" writes: > 0. bar.el does not use lexical-binding. > 1. The second lambda in forty-two does not let-bind foo-42. > 2. If you byte-compile bar.el with bar-have-native-42 set to t, and then > load bar.elc in an Emacs that has bar-have-native-42 set to nil, then > 42.0 gets printed, which is wrong. This is due to the incorrect > usage of eval-when-compile: we want the check to happen at runtime as > well. I think you mean load-time. Anyway, this is true if you want 27.1 elc's to be loadable in 26.x. I was labouring under the impression that we don't care about that (and this is why I thought of the macro approach). Do we? The source file is compatible between multiple emacs version, but is the byte-compiled file also compatible? >> No idea how to check if byte-code is "valid" or not: I just check the >> warnings. Can you tell me? >=20 > 0. emacs -Q -batch -f batch-byte-compile foo.el > 1. emacs -Q > 2. (fset 'json-parse-buffer nil) C-j > 3. M-x load-file RET foo.elc RET > 4. (disassemble 'foo) C-j Thanks. > I think the declarations make the intention explicit to both the reader > and the byte-compiler in a simple way, without wrestling the > eval-*-compile machinery or allowing for subtle bugs like the ones > above. The problem, of course, is that you're repeating yourself, a maintenance hazard. Not too big in this case. Jo=C3=A3o