From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eric S. Raymond" Newsgroups: gmane.emacs.devel Subject: Re: VCSWITNESS = fail ** 2 Date: Sun, 12 Jan 2014 13:45:23 -0500 Organization: Eric Conspiracy Secret Labs Message-ID: <20140112184523.GC16457@thyrsus.com> References: <20140112143733.B3F863811D4@snark.thyrsus.com> <83iotp88sb.fsf@gnu.org> <20140112164520.GA6770@thyrsus.com> <83d2jx85m3.fsf@gnu.org> <8361pp84as.fsf@gnu.org> Reply-To: esr@thyrsus.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1389552335 20508 80.91.229.3 (12 Jan 2014 18:45:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jan 2014 18:45:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 12 19:45:43 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W2Q2Y-0002Jl-No for ged-emacs-devel@m.gmane.org; Sun, 12 Jan 2014 19:45:42 +0100 Original-Received: from localhost ([::1]:39023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2Q2Y-0000ZI-Dm for ged-emacs-devel@m.gmane.org; Sun, 12 Jan 2014 13:45:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2Q2Q-0000ZA-3D for emacs-devel@gnu.org; Sun, 12 Jan 2014 13:45:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2Q2L-0007xR-KD for emacs-devel@gnu.org; Sun, 12 Jan 2014 13:45:33 -0500 Original-Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5]:59366 helo=snark.thyrsus.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2Q2G-0007w3-Br; Sun, 12 Jan 2014 13:45:24 -0500 Original-Received: by snark.thyrsus.com (Postfix, from userid 1000) id BF4053811D4; Sun, 12 Jan 2014 13:45:23 -0500 (EST) Content-Disposition: inline In-Reply-To: <8361pp84as.fsf@gnu.org> X-Eric-Conspiracy: There is no conspiracy User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 71.162.243.5 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:168215 Archived-At: Eli Zaretskii : > Actually, I take that back: the original code should work, and works > for me. > > So let's please step back one notch: can you please tell what exactly > is wrong with the way vcswitness is computed and passed to the > sub-Make? What I know is this: I was trying to modify that code to DTRT in both a Bazaar and .git repo, using .git/HEAD as a witness in the latter case. The way my modification failed caused me to suspect that the original code hadn't been working. So I reverted to the trunk version and instrumented, by inserting an echo before the generated make command. Lo and behold, vcswitness was empty. I looked again. Had I doubled $ properly for the make context? I had; vcswitness was really empty. (But I was already pretty sure of that; if doubling $$ had been incorrect it would have expanded as somebody's process number.) I looked at those three lines again, saw the two different paths, and made a deduction about the failure source that it now appears was incorrect. But I've been around the track a few times, and I know that because of (a) conflicting Makefile and shell expansion rules and (b) the hair associated with nested Makefiles, this sort of code is notoriously easy to misread (as Eli was later reminded himself). So I posted to the list and waited for somebody to point out the flaw in my reasoning. Nobody did. Meanwhile, in my own test builds vcswitness continued to be spuriously empty. The rest you all know. Eli took his own comic pratfall, momentarily breaking the build. And he's been around the track a few times himself. At present, I have no explanation for the observed differences in behavior more predictive than "phase of the moon". Those three lines are, by demonstration, so prone to be misread that they tripped up Eli and me in two different ways and I still have no theory to account for why they were different. That says "maintainence nightmare - should be scrapped and replaced" to me. -- Eric S. Raymond