From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#48228: json-serialize should signal error when dll is not found [MS Windows] Date: Tue, 4 May 2021 19:59:15 +0300 Message-ID: References: <83o8dq4h2s.fsf@gnu.org> <3b2dba36-1714-6c19-556b-6cfe52fdb222@yandex.ru> <87fsz28n5x.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19010"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: p.stephani2@gmail.com, 48228@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 04 19:08:55 2021 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 1ldyXW-0004n8-Bu for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 19:08:54 +0200 Original-Received: from localhost ([::1]:34840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldyXV-0003QP-DO for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 May 2021 13:08:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldyOz-00077w-Tz for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 13:00:12 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldyOw-0000UV-O3 for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 13:00:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ldyOw-0003VB-MH for bug-gnu-emacs@gnu.org; Tue, 04 May 2021 13:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 May 2021 17:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48228 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 48228-submit@debbugs.gnu.org id=B48228.162014756613430 (code B ref 48228); Tue, 04 May 2021 17:00:02 +0000 Original-Received: (at 48228) by debbugs.gnu.org; 4 May 2021 16:59:26 +0000 Original-Received: from localhost ([127.0.0.1]:54308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldyOL-0003UY-SZ for submit@debbugs.gnu.org; Tue, 04 May 2021 12:59:26 -0400 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:44723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldyOJ-0003US-DD for 48228@debbugs.gnu.org; Tue, 04 May 2021 12:59:23 -0400 Original-Received: by mail-wm1-f41.google.com with SMTP id 82-20020a1c01550000b0290142562ff7c9so1809812wmb.3 for <48228@debbugs.gnu.org>; Tue, 04 May 2021 09:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GAfM3E5J7ZSN0oTJ2Fz/eh+Ox+FwO7FmjSQQxXJ6AoQ=; b=aSblWKVNwAjA5c+BlfeX+dXNowVlxEsUugn4EVkUDOLKTI0EQVR0TjxQXk2uaOZD7f m+fWE7CPa+N+xwstBNljC95aUggeu4xXVLJH1EK5IL0m2k7S48tNroL3kwFiUZCl5tG7 xc/UOMoplS0jJVowF8s+9wmGpFK65+05Amti+nkU+imVl+pfXmDtUYum0uwUpVdPkO7O V4FrTVCUPJSh+acaKt11fGLE8a1jV8aHa3c/2UutkzWo8HFOFWOH2IhU8kimfmqK+9M6 AckCCadekFxHNCMtknRIKWsihpgz3/dnbtFyB+8ERunslV2ARSQVLXPjQqcRHzFPp3dI gScg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GAfM3E5J7ZSN0oTJ2Fz/eh+Ox+FwO7FmjSQQxXJ6AoQ=; b=kOFgmQRTvN5QWNqEs/t2v5ENed70dnpcP+kcuA9VUaP/a2Os0fREqYHaWV1B21StCS RFXE6Koam4wzlupUiGGJGszWrKO2j1K5kyU9llYAd2TKVvrCh8xEJ8DalsT6lGixdCCN 66wjWBVKiAz2HLNLeGfRKw85MESt4UDR+TttPhIcS1BC4kQ3+ZK94BR+nhxtFKlDARZv AymBMrstb1lgnx33Utus0cB3VzKTgCyNmz+WqYUIPvIHesMVKBRt5GUixStyp+kpYxi2 r5IXTwsBNJS9GbixMRBVp1i2qGioObSO2v4lr/2yybHz21JI124qN9yyB8peYpEmyM+B 25Tw== X-Gm-Message-State: AOAM5330lH2OWIF6osE6WkiyX8DWE20vXwVE5nE+zzHqgvPR0ph21SBq aq9m+/QC4nYBLexUXysvr9+uXEK64k0= X-Google-Smtp-Source: ABdhPJx34RJFd9arMP7nP4SpcC0or/PYeLwSsZwRLFS/5wF+RVp5psQa4JEK2mFqJshRUdvp+n70Ew== X-Received: by 2002:a1c:9d43:: with SMTP id g64mr16468656wme.140.1620147557257; Tue, 04 May 2021 09:59:17 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id k11sm2935104wmj.1.2021.05.04.09.59.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 May 2021 09:59:16 -0700 (PDT) In-Reply-To: <87fsz28n5x.fsf@gmail.com> Content-Language: en-US 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:205637 Archived-At: On 04.05.2021 19:43, Robert Pluim wrote: > What makes it error-prone? Those existing testing functions (on > Windows) attempt to load the relevant DLL's using the exact same > mechanisms as the actual code, so the failure (and success) modes are > identical. When somebody write code using json-serialize, and it can't do what it was asked to do, it should raise an error. I have code like this in a separate project: (cond ((fboundp 'json-parse-buffer) (json-parse-buffer :array-type 'list :object-type 'alist :null-object nil)) (t (let ((json-array-type 'list)) (json-read)))) It has been there for a couple of years. And only now I find out that it can fail on MS Windows, because that failure is not reproducible on any other platform. I can only hope that whatever random Windows users encountered it saw the message wherever it was printed, and it was not concealed by subsequent messages from the caller code (reporting some cryptic errors, I imagine). That's not to say we must not have a function json-available-p. If it's helpful, why not add it as well.