* [PATCH] BaseTools: Remove dsc nested include checking.
[not found] <20180509073910.19400-1-derek.lin2@hpe.com>
@ 2018-05-09 7:50 ` Lin, Derek (HPS UEFI Dev)
0 siblings, 0 replies; 3+ messages in thread
From: Lin, Derek (HPS UEFI Dev) @ 2018-05-09 7:50 UTC (permalink / raw)
To: edk2-devel@lists.01.org; +Cc: yonghong.zhu@intel.com, Lin, Derek (HPS UEFI Dev)
From: Lin, Derek (HPS UEFI Dev)
Sent: Wednesday, May 9, 2018 3:39 PM
To: Lin, Derek (HPS UEFI Dev) <derek.lin2@hpe.com>
Subject: [PATCH] BaseTools: Remove dsc nested include checking.
The dsc nested include checking make unexpected build error when building project 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/BaseTools/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, Intel Corporation. All rights reserved.<BR> -# (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
+# (C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP<BR>
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -1551,10 +1551,21 @@ class DscParser(MetaFileParser):
self.IncludedFiles.add (IncludedFile1)
+ # todo: rework the nested include checking logic
+ # Current nested include checking rely on dsc file order inside 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 = ID 1 in build.db, and C ID = 2.
+ # Build project B. It give dsc file B ID = 3, and C ID still = 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 level included file
- if Parser._From != Owner and int(Owner) > int (Parser._From):
- EdkLogger.error('parser', FILE_ALREADY_EXIST, File=self._FileWithError,
- Line=self._LineIndex + 1, ExtraData="{0} is already included at a higher level.".format(IncludedFile1))
+ #if Parser._From != Owner and int(Owner) > int (Parser._From):
+ # EdkLogger.error('parser', FILE_ALREADY_EXIST, File=self._FileWithError,
+ # Line=self._LineIndex + 1, ExtraData="{0} is already included at a higher level.".format(IncludedFile1))
# set the parser status with current status
--
2.15.1.windows.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] BaseTools: Remove dsc nested include checking.
[not found] <20180509090202.9200-1-derek.lin2@hpe.com>
@ 2018-05-09 9:03 ` Lin, Derek (HPS UEFI Dev)
2018-06-11 8:39 ` Zhu, Yonghong
0 siblings, 1 reply; 3+ messages in thread
From: Lin, Derek (HPS UEFI Dev) @ 2018-05-09 9:03 UTC (permalink / raw)
To: edk2-devel@lists.01.org; +Cc: yonghong.zhu@intel.com, Lin, Derek (HPS UEFI Dev)
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>
---
BaseTools/Source/Python/Workspace/MetaFileParser.py | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/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, Intel Corporation. All rights reserved.<BR> -# (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
+# (C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP<BR>
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -1551,10 +1551,21 @@ class DscParser(MetaFileParser):
self.IncludedFiles.add (IncludedFile1)
+ # todo: rework the nested include checking logic
+ # Current nested include checking rely on dsc file order inside 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 = ID 1 in build.db, and C ID = 2.
+ # Build project B. It give dsc file B ID = 3, and C ID still = 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 level included file
- if Parser._From != Owner and int(Owner) > int (Parser._From):
- EdkLogger.error('parser', FILE_ALREADY_EXIST, File=self._FileWithError,
- Line=self._LineIndex + 1, ExtraData="{0} is already included at a higher level.".format(IncludedFile1))
+ #if Parser._From != Owner and int(Owner) > int (Parser._From):
+ # EdkLogger.error('parser', FILE_ALREADY_EXIST, File=self._FileWithError,
+ # Line=self._LineIndex + 1, ExtraData="{0} is already included at a higher level.".format(IncludedFile1))
# set the parser status with current status
--
2.15.1.windows.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] BaseTools: Remove dsc nested include checking.
2018-05-09 9:03 ` [PATCH] BaseTools: Remove dsc nested include checking Lin, Derek (HPS UEFI Dev)
@ 2018-06-11 8:39 ` Zhu, Yonghong
0 siblings, 0 replies; 3+ messages in thread
From: Zhu, Yonghong @ 2018-06-11 8:39 UTC (permalink / raw)
To: Lin, Derek (HPS UEFI Dev), edk2-devel@lists.01.org
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Best Regards,
Zhu Yonghong
-----Original Message-----
From: Lin, Derek (HPS UEFI Dev) [mailto:derek.lin2@hpe.com]
Sent: Wednesday, May 09, 2018 5:03 PM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong <yonghong.zhu@intel.com>; Lin, Derek (HPS UEFI Dev) <derek.lin2@hpe.com>
Subject: [PATCH] BaseTools: Remove dsc nested include checking.
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>
---
BaseTools/Source/Python/Workspace/MetaFileParser.py | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/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, Intel Corporation. All rights reserved.<BR> -# (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
+# (C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP<BR>
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -1551,10 +1551,21 @@ class DscParser(MetaFileParser):
self.IncludedFiles.add (IncludedFile1)
+ # todo: rework the nested include checking logic
+ # Current nested include checking rely on dsc file order inside 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 = ID 1 in build.db, and C ID = 2.
+ # Build project B. It give dsc file B ID = 3, and C ID still = 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 level included file
- if Parser._From != Owner and int(Owner) > int (Parser._From):
- EdkLogger.error('parser', FILE_ALREADY_EXIST, File=self._FileWithError,
- Line=self._LineIndex + 1, ExtraData="{0} is already included at a higher level.".format(IncludedFile1))
+ #if Parser._From != Owner and int(Owner) > int (Parser._From):
+ # EdkLogger.error('parser', FILE_ALREADY_EXIST, File=self._FileWithError,
+ # Line=self._LineIndex + 1, ExtraData="{0} is already included at a higher level.".format(IncludedFile1))
# set the parser status with current status
--
2.15.1.windows.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-11 8:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180509090202.9200-1-derek.lin2@hpe.com>
2018-05-09 9:03 ` [PATCH] BaseTools: Remove dsc nested include checking Lin, Derek (HPS UEFI Dev)
2018-06-11 8:39 ` Zhu, Yonghong
[not found] <20180509073910.19400-1-derek.lin2@hpe.com>
2018-05-09 7:50 ` Lin, Derek (HPS UEFI Dev)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox