From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18150 invoked from network); 2 Aug 2022 10:43:27 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 Aug 2022 10:43:27 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1659437007; b=fT/lXqzHpZyjdXxrH5unV/DiI1kFVF57Yyt77XCDR6B6USMOshy9njI+Riv0YOXEKlit0Ylek5 +doAuDjQ/wNHqOwmpoV/UShXB4ufMHy2OLNfG2NlQ7lSRCG4QHAjWvxoDbFmUmcKlHVTqKfG10 kI+dfqfpYvmLRqiV2eIANW4TAyMy3me/tWlB8PfG6ixqlpeGmXJh6GVP9lkE9kC3oYu9ESBGsR 5IQpXFRfiDr2pOihFXYsiwLotOEB9HhnS0ZCci2+GNkAK/2LShjFLbyo8XiQ42XnnOcWxYdTzH PMpZxgU6wjrrobJ1TuP5hbM/a9h/JxTY/ZWkEDo38wm1QQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00013-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.13; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1659437007; bh=GvHZIj/TJ8D4mM1tTbFuu7kn9TbupDA3vxGzUigrV8Y=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Message-ID:In-Reply-To:To:References:Date:Subject: MIME-Version:Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=UKZuWDTiHNs2t7767cV9aGeWvjovcmxRaS6NrGghZQ9//WwL67KMmekroCqprvSgwpfZ/az6cx XrSoB4MhC18wBTlWcAzmYUEQsRB6cRx1VtUCGWsmUMpVLhQXk8e6qCKbMWkviN5s9Ur4keqRX9 LNwzB6DArDRccr+4xQqJTm7jr3ThxxfJX4cDllx7tppGk9MtrQCYOzXP+a6QY44HT5Hu6VkEzi xm8ztCMmUfgwGAVfCJA35APAYe8I9DdG36wN3XKpiBJSO5f1eYxHZEM01t+5rZHtk5sJtWhowf SWUk/1kPuIuREBVZd6sWEB34zB/V+o2sEicWJzh1cZe+hA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-Id:In-Reply-To:To:References: Date:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=XY6nA9Ly4DntlA2b/ap4dEBw75aAHgGnQ/crX/k9CHc=; b=Ugg0rT9BmquirqhDNjd7eEX98c eut1q4QCUth029sRpI5ROQ7b4dbJBPlQd/Gt1Dw9vPwsHfarAi05VxWUy9E+4KhGqVe6xzryOXrSo Q96DECcHV9ARpmJ+tfPwpMnrBOWEWVBQn9CABBvbjlDgRF3zL9FU9CmZw7+3nw+SmXkHLnczaYDS6 heCgJu5aW3u/aDYXVVITo48r6y0gRaclHzGgMW+F+n6riLt+gkdmtlTwmjSadnuc0nf8KRcLPevrH sfHXwKEr9m+oJZ+M+gGsbbvs2xNO8LFr7rjnMmGJqJWz/Ewingx4PoPcCsIjIatxf6hopIenQpRKT iW2rYD4Q==; Received: from authenticated user by zero.zsh.org with local id 1oIpMz-0004Om-MO; Tue, 02 Aug 2022 10:43:25 +0000 Authentication-Results: zsh.org; iprev=pass (snd00013-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.13; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00013-bg.im.kddi.ne.jp ([27.86.113.13]:1601 helo=dfmta0003.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oIpMa-0003v2-NX; Tue, 02 Aug 2022 10:43:03 +0000 Received: from mail.biglobe.ne.jp by omta0003.biglobe.ne.jp with ESMTP id <20220802104254338.LGXR.82237.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Tue, 2 Aug 2022 19:42:54 +0900 From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [PATCH 0/3] completion: make: various improvements Date: Tue, 2 Aug 2022 19:42:53 +0900 References: <20220730010310.3383526-1-felipe.contreras@gmail.com> To: zsh-workers@zsh.org In-Reply-To: <20220730010310.3383526-1-felipe.contreras@gmail.com> Message-Id: X-Mailer: Apple Mail (2.3445.104.21) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 50439 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: > 2022/07/30 10:03, Felipe Contreras wrote: > > While using `call-command` I found very serious issues, for starters > trying to complete `make` in the zsh source code takes several minutes > to complete. > > zstyle ':completion:*:make:*:targets' call-command true Thanks. Could you please update [PATCH 2/3]? (The comment for [PATCH 1/3] is just a note and can be ignored.) [PATCH 1/3] > At least in GNU make 4.3 the -n option is *not* respected and > --always-make builds everything. This is indeed serious; just hitting for completion should _never_ build anything. > Instead use a fake .DEFAULT target the way bash-completion does. If there is a target .DEFAULT in the user's Makefile, its recipe is not executed (due to the -n option) but is echoed to stdout (although the -s option is passed to make; I don't know why). In the _worst_ case this may confuse make-parseDataBase(). For example, if Makefile has the following two lines: .DEFAULT: echo foo: bar then the output of 'make -nsp .DEFAULT' contains a line echo foo: bar and 'echo foo' will be offered as a possible target. But I think we can ignore such (extremely) rare cases. [PATCH 2/3] > The make program does all the heavy lifting, there's no need to use a > full parser. With this patch, if I type 'make ' in the zsh src directory, it offers the following files as targets: configure.ac, Makefile.in, aclocal.m4 etc. These are not make targets, and in the output of 'make -nsp', these are preceded by a line # Not a target: I think a (wrong) target after this line should be ignored.