From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0311321175156 for ; Mon, 11 Jun 2018 01:39:39 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2018 01:39:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,501,1520924400"; d="scan'208";a="48907698" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga006.jf.intel.com with ESMTP; 11 Jun 2018 01:39:39 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Jun 2018 01:39:38 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Jun 2018 01:39:38 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.51]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.82]) with mapi id 14.03.0319.002; Mon, 11 Jun 2018 16:39:36 +0800 From: "Zhu, Yonghong" To: "Lin, Derek (HPS UEFI Dev)" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] BaseTools: Remove dsc nested include checking. Thread-Index: AQHT53R2uSI0zIjXIkeErvNlS0roXKQnGhwwgDPWKYA= Date: Mon, 11 Jun 2018 08:39:36 +0000 Message-ID: References: <20180509090202.9200-1-derek.lin2@hpe.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] BaseTools: Remove dsc nested include checking. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2018 08:39:40 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: Lin, Derek (HPS UEFI Dev) [mailto:derek.lin2@hpe.com]=20 Sent: Wednesday, May 09, 2018 5:03 PM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong ; Lin, Derek (HPS UEFI Dev) Subject: [PATCH] BaseTools: Remove dsc nested include checking. The dsc nested include checking make unexpected build error when building p= roject A and switch to project B. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Derek Lin --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 19 +++++++++++++++--= -- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTool= s/Source/Python/Workspace/MetaFileParser.py index 36843643ed..e1f4ea995d 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -2,7 +2,7 @@ # This file is used to parse meta files # # Copyright (c) 2008 - 2018, I= ntel Corporation. All rights reserved.
-# (C) Copyright 2015-2016 Hewle= tt Packard Enterprise Development LP
+# (C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP
# This program and the accompanying materials # are licensed and made ava= ilable under the terms and conditions of the BSD License # which accompani= es this distribution. The full text of the license may be found at @@ -155= 1,10 +1551,21 @@ class DscParser(MetaFileParser): =20 self.IncludedFiles.add (IncludedFile1) =20 + # todo: rework the nested include checking logic + # Current nested include checking rely on dsc file order insid= e build.db. + # It is not reliable and will lead to build fail in some case. + # + # When project A and B include a common dsc file C. + # Build project A. It give dsc file A =3D ID 1 in build.db, an= d C ID =3D 2. + # Build project B. It give dsc file B ID =3D 3, and C ID still= =3D 2. + # Then, we build project B fail, unless we clean build.db. + # In oldder BaseTools, the project B ID will still be 1, + # that's why it work before. + # Does not allow lower level included file to include upper le= vel included file - if Parser._From !=3D Owner and int(Owner) > int (Parser._From)= : - EdkLogger.error('parser', FILE_ALREADY_EXIST, File=3Dself.= _FileWithError, - Line=3Dself._LineIndex + 1, ExtraData=3D"{0} is alread= y included at a higher level.".format(IncludedFile1)) + #if Parser._From !=3D Owner and int(Owner) > int (Parser._From= ): + # EdkLogger.error('parser', FILE_ALREADY_EXIST, File=3Dself= ._FileWithError, + # Line=3Dself._LineIndex + 1, ExtraData=3D"{0} is alrea= dy included at a higher level.".format(IncludedFile1)) =20 =20 # set the parser status with current status -- 2.15.1.windows.2