From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Poor quality error messages Date: Wed, 05 Jan 2022 14:01:10 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11181"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 05 20:02:40 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 1n5BYW-0002mf-TL for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Jan 2022 20:02:40 +0100 Original-Received: from localhost ([::1]:39458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5BYV-0001dS-5u for ged-emacs-devel@m.gmane-mx.org; Wed, 05 Jan 2022 14:02:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5BXJ-0000ER-Kz for emacs-devel@gnu.org; Wed, 05 Jan 2022 14:01:26 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:48559) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5BXF-0006zC-Mr for emacs-devel@gnu.org; Wed, 05 Jan 2022 14:01:24 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id EBB68441D7A; Wed, 5 Jan 2022 14:01:18 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6FACA441D7C; Wed, 5 Jan 2022 14:01:17 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1641409277; bh=WjD3LlQReMXKSwGDBe4+nmFaQDmG19Rl1Iwj36EkL9s=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=dDESkMQf6dXGkufScsXuE0NlcoHuWchPAVUzYGnXrpNiCSbEv7L/de123g159KLph mBa+eoYCNUfEXjaCmtHj7rlA3QigFXQV9ur2D54TOZHNOVIG+287rr7X9ECj7h312D MldWYePXdMpNZDt45b5RRCjgXWHE4yVcbPT14HJrnZJM3RHj8ytbXb7+0bQPbAlu1p Bwc8MXEDgAQ8Y+rUBIIyz5fBfRDjJdapvWPsOxo4MqJYThlKsUEo1+iBIJq59WhGrb C5wKKlCkEnNyTrUBPecZSvxHsCQbVRYNNdrhn50eHsZmZOLz6Nu+Vko/BcnnS5fCQD 1MTY7RsGgKBrQ== Original-Received: from ceviche (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3031E1202F4; Wed, 5 Jan 2022 14:01:17 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Wed, 5 Jan 2022 18:37:18 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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: , 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:284265 Archived-At: Alan Mackenzie [2022-01-05 18:37:18] wrote: > During a bootstrap (not of the standard code), the make failed, > presenting me with the following half error message: > > In toplevel form: > cedet/ede.el: Error: No applicable method: initialize-instance, nil, nil > make[2]: *** [Makefile:308: cedet/ede.elc] Error 1 > make[2]: *** Waiting for unfinished jobs.... > > .. Is this really the best we can do? > > The following faults with this half message are readily apparent: > > (ii) There is no preposition or verb indicating the relationship between > the missing method (whatever that is) and initialize-instance. `initialize-instance` is a "generic function" (i.e. a function defined via `cl-defgeneric` and which can have different implementations for different argument types, each implementation being called a "method") and the error says that this function was called with a set of arguments for which there is no matching method. [ Side note: this nomenclature comes from CLOS and is a bit different from that used in mainstream class-based OO where what CLOS calls a "generic function" is often called a "method" and what CLOS calls a "method" is just a specific implementation of a method/generic-function in a particular class. ] > (iii) Is initialize-instance the method that is missing? According to the error message, `initialize-instance` was called with arguments nil and nil. The first argument should be an object whose slots needs to be initialized, so it shouldn't be nil, and indeed none of the methods are applicable for the case where the first arg is nil. > (iv) To what is the method (whatever that is) meant to be applicable? To > initialise-instance, perhaps? Or to "nil, nil"? Or to something else? The generic function by defaults comes with basically only one method which handles the case where the first arg is an EIEIO object. > (v) It is not clear what the "nil, nil" at the end of the half message is > meant to mean. I think it's the list of arguments passed to `initialise-instance`. > Just for info, grep finds no matches for "initialize-instance" in ede.el. `initialize-instance` is used internally by `make-instance` (and `make-instance` is used internally by the constructor defined by `defclass`). I.e. when the code defines a class with (defclass FOO ...) it defines a constructor called FOO which calls `make-instance` which in turn calls `initialize-instance` (as well as `shared-initialize`, IIRC). Stefan