From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=15.241.48.72; helo=g9t5008.houston.hpe.com; envelope-from=derek.lin2@hpe.com; receiver=edk2-devel@lists.01.org Received: from g9t5008.houston.hpe.com (g9t5008.houston.hpe.com [15.241.48.72]) (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 DD1EA203B858C for ; Wed, 9 May 2018 00:50:56 -0700 (PDT) Received: from G4W9122.americas.hpqcorp.net (exchangepmrr1.us.hpecorp.net [16.210.21.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5008.houston.hpe.com (Postfix) with ESMTPS id F23CA70 for ; Wed, 9 May 2018 07:50:55 +0000 (UTC) Received: from G4W9122.americas.hpqcorp.net (2002:10d2:1511::10d2:1511) by G4W9122.americas.hpqcorp.net (2002:10d2:1511::10d2:1511) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 9 May 2018 07:50:40 +0000 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (15.241.52.12) by G4W9122.americas.hpqcorp.net (16.210.21.17) with Microsoft SMTP Server (TLS) id 15.0.1178.4 via Frontend Transport; Wed, 9 May 2018 07:50:40 +0000 Received: from CS1PR8401MB0678.NAMPRD84.PROD.OUTLOOK.COM (10.169.15.11) by CS1PR8401MB0662.NAMPRD84.PROD.OUTLOOK.COM (10.169.15.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.17; Wed, 9 May 2018 07:50:38 +0000 Received: from CS1PR8401MB0678.NAMPRD84.PROD.OUTLOOK.COM ([fe80::a04f:e190:f2e7:d258]) by CS1PR8401MB0678.NAMPRD84.PROD.OUTLOOK.COM ([fe80::a04f:e190:f2e7:d258%15]) with mapi id 15.20.0735.019; Wed, 9 May 2018 07:50:38 +0000 From: "Lin, Derek (HPS UEFI Dev)" To: "edk2-devel@lists.01.org" CC: "yonghong.zhu@intel.com" , "Lin, Derek (HPS UEFI Dev)" Thread-Topic: [PATCH] BaseTools: Remove dsc nested include checking. Thread-Index: AQHT52jq+v8wyksTgkio11ZkOfdoEKQnBdhw Date: Wed, 9 May 2018 07:50:38 +0000 Message-ID: References: <20180509073910.19400-1-derek.lin2@hpe.com> In-Reply-To: <20180509073910.19400-1-derek.lin2@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.242.247.137] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CS1PR8401MB0662; 7:yXhFPfq/qMe9uK3ZizXNp8r1dtcnSlvOwAFKmTYPEeQhIAFY+tKpA1ybc3rIJXzeyLaTnCmLgMlOANeffGE6ypZwVQxBwcuZPNIycYSAi0sBDhT5BhPIwECkwn0eutatHNuilZcfVbYjovlIhTrJrzHHBDtzr7QEaFvJsqz6uyslFDW6Nay/dOc9UERXBZMhuoSemy2OVyeMpKjeyt8kTe7WAlCCuQXj4jFzt880QiPSQwZ8RUq8g/cgYe6W5Xnp x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10019020)(346002)(39380400002)(376002)(39860400002)(366004)(396003)(199004)(189003)(45074003)(53936002)(26005)(6506007)(3660700001)(106356001)(74316002)(6436002)(6116002)(3846002)(7736002)(5660300001)(8676002)(55016002)(9686003)(97736004)(105586002)(5640700003)(186003)(3280700002)(2351001)(53546011)(2900100001)(6916009)(81156014)(14454004)(54906003)(316002)(86362001)(2906002)(81166006)(305945005)(68736007)(25786009)(99286004)(486006)(8936002)(5250100002)(2501003)(102836004)(11346002)(76176011)(476003)(1857600001)(33656002)(478600001)(7696005)(59450400001)(66066001)(4326008)(446003); DIR:OUT; SFP:1102; SCL:1; SRVR:CS1PR8401MB0662; H:CS1PR8401MB0678.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:(222181515654134); BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989080)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(48565401081)(2017052603328)(7153060)(7193020); SRVR:CS1PR8401MB0662; x-ms-traffictypediagnostic: CS1PR8401MB0662: authentication-results: spf=none (sender IP is ) smtp.mailfrom=derek.lin2@hpe.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(222181515654134)(17755550239193); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:CS1PR8401MB0662; BCL:0; PCL:0; RULEID:; SRVR:CS1PR8401MB0662; x-forefront-prvs: 0667289FF8 received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: rFjdaiBrWyd6b+YX5ELlB5kBuY4wk+vO5eKS7+6pGIcbLMAvUP8n1MwgBmkJurranKI9pT0wAcyfWpSdG7SPDN+VCcEd3sAzXwhvE/heziZgdA5ElzzJWJhUSf79FyjWGeVnahXTIgmnVtfxZZrDwqW+bKr7vO9kDHKCTWXSzUlnzEShLCOm1tixWYjNTlOG spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 66d8faa3-dc40-4115-798f-08d5b5818e32 X-MS-Exchange-CrossTenant-Network-Message-Id: 66d8faa3-dc40-4115-798f-08d5b5818e32 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 May 2018 07:50:38.2780 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0662 X-OriginatorOrg: hpe.com Subject: [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: Wed, 09 May 2018 07:50:57 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable From: Lin, Derek (HPS UEFI Dev)=20 Sent: Wednesday, May 9, 2018 3:39 PM To: 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. --- 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..092253530f 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,=20 + # 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