]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Remove dsc nested include checking.
authorDerek Lin <derek.lin2@hpe.com>
Wed, 9 May 2018 09:03:21 +0000 (17:03 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Mon, 11 Jun 2018 15:03:05 +0000 (23:03 +0800)
The dsc nested include checking make unexpected build error when
building project A and switch to project B.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Derek Lin <derek.lin2@hpe.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Workspace/MetaFileParser.py

index 8ab1dd23a09621db4c6d2dc4d72823f1fe6d1b20..b1e715d5d4a9975944c7aef94c89dab6419060d4 100644 (file)
@@ -2,7 +2,7 @@
 # This file is used to parse meta files\r
 #\r
 # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
-# (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
+# (C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -1551,10 +1551,21 @@ class DscParser(MetaFileParser):
 \r
             self.IncludedFiles.add (IncludedFile1)\r
 \r
+            # todo: rework the nested include checking logic\r
+            # Current nested include checking rely on dsc file order inside build.db.\r
+            # It is not reliable and will lead to build fail in some case.\r
+            #\r
+            # When project A and B include a common dsc file C.\r
+            # Build project A. It give dsc file A = ID 1 in build.db, and C ID = 2.\r
+            # Build project B. It give dsc file B ID = 3, and C ID still = 2.\r
+            # Then, we build project B fail, unless we clean build.db.\r
+            # In oldder BaseTools, the project B ID will still be 1,\r
+            # that's why it work before.\r
+\r
             # Does not allow lower level included file to include upper level included file\r
-            if Parser._From != Owner and int(Owner) > int (Parser._From):\r
-                EdkLogger.error('parser', FILE_ALREADY_EXIST, File=self._FileWithError,\r
-                    Line=self._LineIndex + 1, ExtraData="{0} is already included at a higher level.".format(IncludedFile1))\r
+            #if Parser._From != Owner and int(Owner) > int (Parser._From):\r
+            #   EdkLogger.error('parser', FILE_ALREADY_EXIST, File=self._FileWithError,\r
+            #       Line=self._LineIndex + 1, ExtraData="{0} is already included at a higher level.".format(IncludedFile1))\r
 \r
 \r
             # set the parser status with current status\r