From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Wed, 17 Apr 2019 06:23:06 -0700 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6AB06307C94B; Wed, 17 Apr 2019 13:23:05 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-123-180.rdu2.redhat.com [10.10.123.180]) by smtp.corp.redhat.com (Postfix) with ESMTP id 526C1608D0; Wed, 17 Apr 2019 13:23:04 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH] BaseTools:Makefiles cause data errors on some platforms To: devel@edk2.groups.io, zhijux.fan@intel.com, "Feng, Bob C" Cc: "Gao, Liming" References: From: "Laszlo Ersek" Message-ID: Date: Wed, 17 Apr 2019 15:23:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 17 Apr 2019 13:23:05 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi, On 04/17/19 04:02, Fan, ZhijuX wrote: > As the Dict is unordered, an error occurs when using the Dict > while creating a new item.So for now, use OrdereDict instead > of Dict. this problem statement is impenetrable. - What is the exact symptom? - What triggers it, and where? - When we make the dict ordered, why does that mitigate the issue? - Do we have a BZ for this? The subject line of the patch is similarly unhelpful: "data errors on some platforms". It's basically devoid of information. --*-- Recently I've also seen a number of commits (with different code changes) where the subject line was reused identically.... Yup: 1 2914e8153dd3 BaseTools: Fix corner-cases of --hash feature 2 1b8caf0d87ea BaseTools: Fix corner-cases of --hash feature 3 f2b5e04acad2 BaseTools: Fix corner-cases of --hash feature 4 db4d47fd3ae9 BaseTools: Fix corner-cases of --hash feature What's really sad here is that the commit messages are otherwise pretty helpful, it's just that the subject lines were chosen in an unfortunate way. Bob: please enforce higher standards for commit messages under BaseTools. People *care*. (I certainly do.) Good commit messages teach details about the subsystem or module. Thanks, Laszlo > > Cc: Bob Feng > Cc: Liming Gao > Signed-off-by: Zhiju.Fan > --- > BaseTools/Source/Python/AutoGen/GenMake.py | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py > index 7562dc68b3..426e6ca51a 100644 > --- a/BaseTools/Source/Python/AutoGen/GenMake.py > +++ b/BaseTools/Source/Python/AutoGen/GenMake.py > @@ -429,7 +429,7 @@ cleanlib: > self.CommonFileDependency = [] > self.FileListMacros = {} > self.ListFileMacros = {} > - self.ObjTargetDict = {} > + self.ObjTargetDict = OrderedDict() > self.FileCache = {} > self.LibraryBuildCommandList = [] > self.LibraryFileList = [] > @@ -954,11 +954,9 @@ cleanlib: > self.ListFileMacros[T.IncListFileMacro] = [] > if self._AutoGenObject.BuildRuleFamily == TAB_COMPILER_MSFT and Type == TAB_C_CODE_FILE: > NewFile = self.PlaceMacro(str(T), self.Macros) > - if self.ObjTargetDict.get(T.Target.SubDir): > - self.ObjTargetDict[T.Target.SubDir].add(NewFile) > - else: > + if not self.ObjTargetDict.get(T.Target.SubDir): > self.ObjTargetDict[T.Target.SubDir] = set() > - self.ObjTargetDict[T.Target.SubDir].add(NewFile) > + self.ObjTargetDict[T.Target.SubDir].add(NewFile) > > Deps = [] > CCodeDeps = [] >