* [edk2-devel] [edk2 Patch 0/1] Fix invalid escape sequence \C syntax warning @ 2024-02-06 7:02 Jayaprakash, N 2024-02-06 7:02 ` [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C Jayaprakash, N 0 siblings, 1 reply; 13+ messages in thread From: Jayaprakash, N @ 2024-02-06 7:02 UTC (permalink / raw) To: devel; +Cc: Jayaprakash N This patch fixes the invalid escape sequence \C syntax warning while building the edk2 sources on Windows OS. The issue was reported through BZ4666 Jayaprakash N (1): BaseTools: Syntax warning invalid escape sequence \C BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.40.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115147): https://edk2.groups.io/g/devel/message/115147 Mute This Topic: https://groups.io/mt/104193925/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
* [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C 2024-02-06 7:02 [edk2-devel] [edk2 Patch 0/1] Fix invalid escape sequence \C syntax warning Jayaprakash, N @ 2024-02-06 7:02 ` Jayaprakash, N 2024-02-06 14:32 ` Laszlo Ersek ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Jayaprakash, N @ 2024-02-06 7:02 UTC (permalink / raw) To: devel Cc: Jayaprakash N, Rebecca Cran, Michael D Kinney, Laszlo Ersek, Liming Gao, Bob Feng, Yuwei Chen REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 This commit fixes the issue reported through BZ4666. The Syntax warning related to invalid escape sequence for \C is seen on Windows OS based builds of edk2 sources. On Windows the path seperator needs to prefixed with \ so essentially we need to use \\ as path seperator. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Jayaprakash N <n.jayaprakash@intel.com> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> --- BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 4768099343..b69d406249 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): for include_file in IncFileList: MakeApp += "$(OBJECTS) : %s\n" % include_file if sys.platform == "win32": - PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) + PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\\C\\Common\\PcdValueCommon.c")) MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath) MakeApp = MakeApp + '\tcopy /y %s $@\n' % (PcdValueCommonPath) else: -- 2.40.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115148): https://edk2.groups.io/g/devel/message/115148 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C 2024-02-06 7:02 ` [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C Jayaprakash, N @ 2024-02-06 14:32 ` Laszlo Ersek 2024-02-06 16:43 ` Pedro Falcato 2024-02-28 0:29 ` Rebecca Cran 2 siblings, 0 replies; 13+ messages in thread From: Laszlo Ersek @ 2024-02-06 14:32 UTC (permalink / raw) To: Jayaprakash N, devel Cc: Rebecca Cran, Michael D Kinney, Liming Gao, Bob Feng, Yuwei Chen On 2/6/24 08:02, Jayaprakash N wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 > > This commit fixes the issue reported through BZ4666. > The Syntax warning related to invalid escape sequence > for \C is seen on Windows OS based builds of edk2 sources. > On Windows the path seperator needs to prefixed with \ > so essentially we need to use \\ as path seperator. > > Cc: Rebecca Cran <rebecca@bsdio.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Bob Feng <bob.c.feng@intel.com> > Cc: Yuwei Chen <yuwei.chen@intel.com> > Cc: Jayaprakash N <n.jayaprakash@intel.com> > Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> > --- > BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py > index 4768099343..b69d406249 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): > for include_file in IncFileList: > MakeApp += "$(OBJECTS) : %s\n" % include_file > if sys.platform == "win32": > - PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) > + PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\\C\\Common\\PcdValueCommon.c")) > MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath) > MakeApp = MakeApp + '\tcopy /y %s $@\n' % (PcdValueCommonPath) > else: Reviewed-by: Laszlo Ersek <lersek@redhat.com> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115165): https://edk2.groups.io/g/devel/message/115165 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C 2024-02-06 7:02 ` [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C Jayaprakash, N 2024-02-06 14:32 ` Laszlo Ersek @ 2024-02-06 16:43 ` Pedro Falcato 2024-02-07 3:27 ` Jayaprakash, N [not found] ` <17B176ECA49BD037.2925@groups.io> 2024-02-28 0:29 ` Rebecca Cran 2 siblings, 2 replies; 13+ messages in thread From: Pedro Falcato @ 2024-02-06 16:43 UTC (permalink / raw) To: devel, n.jayaprakash Cc: Rebecca Cran, Michael D Kinney, Laszlo Ersek, Liming Gao, Bob Feng, Yuwei Chen On Tue, Feb 6, 2024 at 7:02 AM Jayaprakash, N <n.jayaprakash@intel.com> wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 > > This commit fixes the issue reported through BZ4666. > The Syntax warning related to invalid escape sequence > for \C is seen on Windows OS based builds of edk2 sources. > On Windows the path seperator needs to prefixed with \ > so essentially we need to use \\ as path seperator. > > Cc: Rebecca Cran <rebecca@bsdio.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Bob Feng <bob.c.feng@intel.com> > Cc: Yuwei Chen <yuwei.chen@intel.com> > Cc: Jayaprakash N <n.jayaprakash@intel.com> > Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> > --- > BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py > index 4768099343..b69d406249 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): > for include_file in IncFileList: > MakeApp += "$(OBJECTS) : %s\n" % include_file > if sys.platform == "win32": > - PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) > + PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\\C\\Common\\PcdValueCommon.c")) AIUI, changing the \ to / would also work (and it would be prettier/more readable), since we're calling normpath right after. -- Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115182): https://edk2.groups.io/g/devel/message/115182 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C 2024-02-06 16:43 ` Pedro Falcato @ 2024-02-07 3:27 ` Jayaprakash, N [not found] ` <17B176ECA49BD037.2925@groups.io> 1 sibling, 0 replies; 13+ messages in thread From: Jayaprakash, N @ 2024-02-07 3:27 UTC (permalink / raw) To: Pedro Falcato, devel@edk2.groups.io Cc: Rebecca Cran, Kinney, Michael D, Laszlo Ersek, Liming Gao, Feng, Bob C, Chen, Christine Thanks Pedro. I thought about using / instead of \\ but in many places, the path separator \\ is still used across the code. But after looking at the usage of path separator in other parts of the code. I decided to go with \\. For example: In the same file: 2953 : MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath) 2842: if sys.platform == "win32": MakeApp = MakeApp + 'APPFILE = %s\\%s.exe\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + 'INC = ' Hence to align with the usage of path separator for "win32", I have used the \\ instead of /. Hope this is fine. Regards, JP -----Original Message----- From: Pedro Falcato <pedro.falcato@gmail.com> Sent: Tuesday, February 6, 2024 10:14 PM To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com> Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C On Tue, Feb 6, 2024 at 7:02 AM Jayaprakash, N <n.jayaprakash@intel.com> wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 > > This commit fixes the issue reported through BZ4666. > The Syntax warning related to invalid escape sequence for \C is seen > on Windows OS based builds of edk2 sources. > On Windows the path seperator needs to prefixed with \ so essentially > we need to use \\ as path seperator. > > Cc: Rebecca Cran <rebecca@bsdio.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Bob Feng <bob.c.feng@intel.com> > Cc: Yuwei Chen <yuwei.chen@intel.com> > Cc: Jayaprakash N <n.jayaprakash@intel.com> > Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> > --- > BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py > b/BaseTools/Source/Python/Workspace/DscBuildData.py > index 4768099343..b69d406249 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): > for include_file in IncFileList: > MakeApp += "$(OBJECTS) : %s\n" % include_file > if sys.platform == "win32": > - PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) > + PcdValueCommonPath = > + os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH" > + ], "Source\\C\\Common\\PcdValueCommon.c")) AIUI, changing the \ to / would also work (and it would be prettier/more readable), since we're calling normpath right after. -- Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115223): https://edk2.groups.io/g/devel/message/115223 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <17B176ECA49BD037.2925@groups.io>]
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C [not found] ` <17B176ECA49BD037.2925@groups.io> @ 2024-02-09 10:37 ` Jayaprakash, N 2024-02-09 14:24 ` Pedro Falcato [not found] ` <17B22B806B304043.15017@groups.io> 1 sibling, 1 reply; 13+ messages in thread From: Jayaprakash, N @ 2024-02-09 10:37 UTC (permalink / raw) To: devel@edk2.groups.io, Jayaprakash, N, Pedro Falcato Cc: Rebecca Cran, Kinney, Michael D, Laszlo Ersek, Liming Gao, Feng, Bob C, Chen, Christine Hi Pedro, Do you agree with the below thoughts? Let me know if you have any questions. Regards, JP -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jayaprakash, N Sent: Wednesday, February 7, 2024 8:58 AM To: Pedro Falcato <pedro.falcato@gmail.com>; devel@edk2.groups.io Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C Thanks Pedro. I thought about using / instead of \\ but in many places, the path separator \\ is still used across the code. But after looking at the usage of path separator in other parts of the code. I decided to go with \\. For example: In the same file: 2953 : MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath) 2842: if sys.platform == "win32": MakeApp = MakeApp + 'APPFILE = %s\\%s.exe\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + 'INC = ' Hence to align with the usage of path separator for "win32", I have used the \\ instead of /. Hope this is fine. Regards, JP -----Original Message----- From: Pedro Falcato <pedro.falcato@gmail.com> Sent: Tuesday, February 6, 2024 10:14 PM To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com> Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C On Tue, Feb 6, 2024 at 7:02 AM Jayaprakash, N <n.jayaprakash@intel.com> wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 > > This commit fixes the issue reported through BZ4666. > The Syntax warning related to invalid escape sequence for \C is seen > on Windows OS based builds of edk2 sources. > On Windows the path seperator needs to prefixed with \ so essentially > we need to use \\ as path seperator. > > Cc: Rebecca Cran <rebecca@bsdio.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Bob Feng <bob.c.feng@intel.com> > Cc: Yuwei Chen <yuwei.chen@intel.com> > Cc: Jayaprakash N <n.jayaprakash@intel.com> > Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> > --- > BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py > b/BaseTools/Source/Python/Workspace/DscBuildData.py > index 4768099343..b69d406249 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): > for include_file in IncFileList: > MakeApp += "$(OBJECTS) : %s\n" % include_file > if sys.platform == "win32": > - PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) > + PcdValueCommonPath = > + os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH" > + ], "Source\\C\\Common\\PcdValueCommon.c")) AIUI, changing the \ to / would also work (and it would be prettier/more readable), since we're calling normpath right after. -- Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115300): https://edk2.groups.io/g/devel/message/115300 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C 2024-02-09 10:37 ` Jayaprakash, N @ 2024-02-09 14:24 ` Pedro Falcato 0 siblings, 0 replies; 13+ messages in thread From: Pedro Falcato @ 2024-02-09 14:24 UTC (permalink / raw) To: devel, n.jayaprakash Cc: Rebecca Cran, Kinney, Michael D, Laszlo Ersek, Liming Gao, Feng, Bob C, Chen, Christine On Fri, Feb 9, 2024 at 10:37 AM Jayaprakash, N <n.jayaprakash@intel.com> wrote: > > Hi Pedro, > > Do you agree with the below thoughts? Let me know if you have any questions. Yes, SGTM, but I'm also not a maintainer of this code :) -- Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115305): https://edk2.groups.io/g/devel/message/115305 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <17B22B806B304043.15017@groups.io>]
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C [not found] ` <17B22B806B304043.15017@groups.io> @ 2024-02-13 16:24 ` Jayaprakash, N 2024-02-14 15:03 ` Rebecca Cran 0 siblings, 1 reply; 13+ messages in thread From: Jayaprakash, N @ 2024-02-13 16:24 UTC (permalink / raw) To: devel@edk2.groups.io, Jayaprakash, N, Pedro Falcato Cc: Rebecca Cran, Kinney, Michael D, Laszlo Ersek, Liming Gao, Feng, Bob C, Chen, Christine Could one of the maintainers of this package review this patch? Regards, JP -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jayaprakash, N Sent: Friday, February 9, 2024 4:07 PM To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>; Pedro Falcato <pedro.falcato@gmail.com> Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C Hi Pedro, Do you agree with the below thoughts? Let me know if you have any questions. Regards, JP -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jayaprakash, N Sent: Wednesday, February 7, 2024 8:58 AM To: Pedro Falcato <pedro.falcato@gmail.com>; devel@edk2.groups.io Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C Thanks Pedro. I thought about using / instead of \\ but in many places, the path separator \\ is still used across the code. But after looking at the usage of path separator in other parts of the code. I decided to go with \\. For example: In the same file: 2953 : MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath) 2842: if sys.platform == "win32": MakeApp = MakeApp + 'APPFILE = %s\\%s.exe\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + 'INC = ' Hence to align with the usage of path separator for "win32", I have used the \\ instead of /. Hope this is fine. Regards, JP -----Original Message----- From: Pedro Falcato <pedro.falcato@gmail.com> Sent: Tuesday, February 6, 2024 10:14 PM To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com> Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C On Tue, Feb 6, 2024 at 7:02 AM Jayaprakash, N <n.jayaprakash@intel.com> wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 > > This commit fixes the issue reported through BZ4666. > The Syntax warning related to invalid escape sequence for \C is seen > on Windows OS based builds of edk2 sources. > On Windows the path seperator needs to prefixed with \ so essentially > we need to use \\ as path seperator. > > Cc: Rebecca Cran <rebecca@bsdio.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Bob Feng <bob.c.feng@intel.com> > Cc: Yuwei Chen <yuwei.chen@intel.com> > Cc: Jayaprakash N <n.jayaprakash@intel.com> > Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> > --- > BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py > b/BaseTools/Source/Python/Workspace/DscBuildData.py > index 4768099343..b69d406249 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): > for include_file in IncFileList: > MakeApp += "$(OBJECTS) : %s\n" % include_file > if sys.platform == "win32": > - PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) > + PcdValueCommonPath = > + os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH" > + ], "Source\\C\\Common\\PcdValueCommon.c")) AIUI, changing the \ to / would also work (and it would be prettier/more readable), since we're calling normpath right after. -- Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115390): https://edk2.groups.io/g/devel/message/115390 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C 2024-02-13 16:24 ` Jayaprakash, N @ 2024-02-14 15:03 ` Rebecca Cran 2024-02-14 15:10 ` Jayaprakash, N 0 siblings, 1 reply; 13+ messages in thread From: Rebecca Cran @ 2024-02-14 15:03 UTC (permalink / raw) To: Jayaprakash, N, devel@edk2.groups.io, Pedro Falcato Cc: Kinney, Michael D, Laszlo Ersek, Liming Gao, Feng, Bob C, Chen, Christine Reviewed-by: Rebecca Cran <rebecca@bsdio.com> On 2/13/24 09:24, Jayaprakash, N wrote: > Could one of the maintainers of this package review this patch? > > Regards, > JP > > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jayaprakash, N > Sent: Friday, February 9, 2024 4:07 PM > To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>; Pedro Falcato <pedro.falcato@gmail.com> > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C > > Hi Pedro, > > Do you agree with the below thoughts? Let me know if you have any questions. > > Regards, > JP > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jayaprakash, N > Sent: Wednesday, February 7, 2024 8:58 AM > To: Pedro Falcato <pedro.falcato@gmail.com>; devel@edk2.groups.io > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C > > Thanks Pedro. > > I thought about using / instead of \\ but in many places, the path separator \\ is still used across the code. > But after looking at the usage of path separator in other parts of the code. I decided to go with \\. > > For example: > In the same file: > 2953 : MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath) > > 2842: if sys.platform == "win32": > MakeApp = MakeApp + 'APPFILE = %s\\%s.exe\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + 'INC = ' > > Hence to align with the usage of path separator for "win32", I have used the \\ instead of /. > > Hope this is fine. > > Regards, > JP > > -----Original Message----- > From: Pedro Falcato <pedro.falcato@gmail.com> > Sent: Tuesday, February 6, 2024 10:14 PM > To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com> > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C > > On Tue, Feb 6, 2024 at 7:02 AM Jayaprakash, N <n.jayaprakash@intel.com> wrote: >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 >> >> This commit fixes the issue reported through BZ4666. >> The Syntax warning related to invalid escape sequence for \C is seen >> on Windows OS based builds of edk2 sources. >> On Windows the path seperator needs to prefixed with \ so essentially >> we need to use \\ as path seperator. >> >> Cc: Rebecca Cran <rebecca@bsdio.com> >> Cc: Michael D Kinney <michael.d.kinney@intel.com> >> Cc: Laszlo Ersek <lersek@redhat.com> >> Cc: Liming Gao <gaoliming@byosoft.com.cn> >> Cc: Bob Feng <bob.c.feng@intel.com> >> Cc: Yuwei Chen <yuwei.chen@intel.com> >> Cc: Jayaprakash N <n.jayaprakash@intel.com> >> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> >> --- >> BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py >> b/BaseTools/Source/Python/Workspace/DscBuildData.py >> index 4768099343..b69d406249 100644 >> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py >> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py >> @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): >> for include_file in IncFileList: >> MakeApp += "$(OBJECTS) : %s\n" % include_file >> if sys.platform == "win32": >> - PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) >> + PcdValueCommonPath = >> + os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH" >> + ], "Source\\C\\Common\\PcdValueCommon.c")) > AIUI, changing the \ to / would also work (and it would be prettier/more readable), since we're calling normpath right after. > > -- > Pedro > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115460): https://edk2.groups.io/g/devel/message/115460 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C 2024-02-14 15:03 ` Rebecca Cran @ 2024-02-14 15:10 ` Jayaprakash, N 2024-02-14 17:25 ` Michael D Kinney 0 siblings, 1 reply; 13+ messages in thread From: Jayaprakash, N @ 2024-02-14 15:10 UTC (permalink / raw) To: Rebecca Cran, devel@edk2.groups.io, Pedro Falcato Cc: Kinney, Michael D, Laszlo Ersek, Liming Gao, Feng, Bob C, Chen, Christine Thanks Rebecca for the review. This is an harmless simple change Will it be considered for the Feb 2024 stable release of edk2? Regards, JP -----Original Message----- From: Rebecca Cran <rebecca@bsdio.com> Sent: Wednesday, February 14, 2024 8:33 PM To: Jayaprakash, N <n.jayaprakash@intel.com>; devel@edk2.groups.io; Pedro Falcato <pedro.falcato@gmail.com> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C Reviewed-by: Rebecca Cran <rebecca@bsdio.com> On 2/13/24 09:24, Jayaprakash, N wrote: > Could one of the maintainers of this package review this patch? > > Regards, > JP > > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of > Jayaprakash, N > Sent: Friday, February 9, 2024 4:07 PM > To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>; > Pedro Falcato <pedro.falcato@gmail.com> > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D > <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming > Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; > Chen, Christine <yuwei.chen@intel.com> > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > invalid escape sequence \C > > Hi Pedro, > > Do you agree with the below thoughts? Let me know if you have any questions. > > Regards, > JP > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of > Jayaprakash, N > Sent: Wednesday, February 7, 2024 8:58 AM > To: Pedro Falcato <pedro.falcato@gmail.com>; devel@edk2.groups.io > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D > <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming > Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; > Chen, Christine <yuwei.chen@intel.com> > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > invalid escape sequence \C > > Thanks Pedro. > > I thought about using / instead of \\ but in many places, the path separator \\ is still used across the code. > But after looking at the usage of path separator in other parts of the code. I decided to go with \\. > > For example: > In the same file: > 2953 : MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % > (self.OutputPath, PcdValueCommonPath) > > 2842: if sys.platform == "win32": > MakeApp = MakeApp + 'APPFILE = %s\\%s.exe\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + 'INC = ' > > Hence to align with the usage of path separator for "win32", I have used the \\ instead of /. > > Hope this is fine. > > Regards, > JP > > -----Original Message----- > From: Pedro Falcato <pedro.falcato@gmail.com> > Sent: Tuesday, February 6, 2024 10:14 PM > To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com> > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D > <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; Liming > Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; > Chen, Christine <yuwei.chen@intel.com> > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > invalid escape sequence \C > > On Tue, Feb 6, 2024 at 7:02 AM Jayaprakash, N <n.jayaprakash@intel.com> wrote: >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 >> >> This commit fixes the issue reported through BZ4666. >> The Syntax warning related to invalid escape sequence for \C is seen >> on Windows OS based builds of edk2 sources. >> On Windows the path seperator needs to prefixed with \ so essentially >> we need to use \\ as path seperator. >> >> Cc: Rebecca Cran <rebecca@bsdio.com> >> Cc: Michael D Kinney <michael.d.kinney@intel.com> >> Cc: Laszlo Ersek <lersek@redhat.com> >> Cc: Liming Gao <gaoliming@byosoft.com.cn> >> Cc: Bob Feng <bob.c.feng@intel.com> >> Cc: Yuwei Chen <yuwei.chen@intel.com> >> Cc: Jayaprakash N <n.jayaprakash@intel.com> >> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> >> --- >> BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py >> b/BaseTools/Source/Python/Workspace/DscBuildData.py >> index 4768099343..b69d406249 100644 >> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py >> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py >> @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): >> for include_file in IncFileList: >> MakeApp += "$(OBJECTS) : %s\n" % include_file >> if sys.platform == "win32": >> - PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) >> + PcdValueCommonPath = >> + os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH" >> + ], "Source\\C\\Common\\PcdValueCommon.c")) > AIUI, changing the \ to / would also work (and it would be prettier/more readable), since we're calling normpath right after. > > -- > Pedro > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115461): https://edk2.groups.io/g/devel/message/115461 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C 2024-02-14 15:10 ` Jayaprakash, N @ 2024-02-14 17:25 ` Michael D Kinney 2024-02-15 3:47 ` Jayaprakash, N 0 siblings, 1 reply; 13+ messages in thread From: Michael D Kinney @ 2024-02-14 17:25 UTC (permalink / raw) To: Jayaprakash, N, Rebecca Cran, devel@edk2.groups.io, Pedro Falcato, Leif Lindholm, Andrew Fish (afish@apple.com), Gao, Liming Cc: Laszlo Ersek, Liming Gao, Feng, Bob C, Chen, Christine, Kinney, Michael D Hi JP, I agree this is a simple change and the review was started before the soft freeze, but a review by the maintainer did not occur until the hard freeze. This means it needs to meet the critical bug criteria. This change removes an incorrect warning message from the build log, but does not appear to have any impact on build behavior/output. I recommend this patch merge be deferred until after the edk2-stable202402 release. Thanks, Mike > -----Original Message----- > From: Jayaprakash, N <n.jayaprakash@intel.com> > Sent: Wednesday, February 14, 2024 7:10 AM > To: Rebecca Cran <rebecca@bsdio.com>; devel@edk2.groups.io; Pedro > Falcato <pedro.falcato@gmail.com> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek > <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C > <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> > Subject: RE: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > invalid escape sequence \C > > Thanks Rebecca for the review. > > This is an harmless simple change > Will it be considered for the Feb 2024 stable release of edk2? > > Regards, > JP > -----Original Message----- > From: Rebecca Cran <rebecca@bsdio.com> > Sent: Wednesday, February 14, 2024 8:33 PM > To: Jayaprakash, N <n.jayaprakash@intel.com>; devel@edk2.groups.io; > Pedro Falcato <pedro.falcato@gmail.com> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek > <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C > <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > invalid escape sequence \C > > Reviewed-by: Rebecca Cran <rebecca@bsdio.com> > > > On 2/13/24 09:24, Jayaprakash, N wrote: > > Could one of the maintainers of this package review this patch? > > > > Regards, > > JP > > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of > > Jayaprakash, N > > Sent: Friday, February 9, 2024 4:07 PM > > To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>; > > Pedro Falcato <pedro.falcato@gmail.com> > > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D > > <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; > Liming > > Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; > > Chen, Christine <yuwei.chen@intel.com> > > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > > invalid escape sequence \C > > > > Hi Pedro, > > > > Do you agree with the below thoughts? Let me know if you have any > questions. > > > > Regards, > > JP > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of > > Jayaprakash, N > > Sent: Wednesday, February 7, 2024 8:58 AM > > To: Pedro Falcato <pedro.falcato@gmail.com>; devel@edk2.groups.io > > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D > > <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; > Liming > > Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; > > Chen, Christine <yuwei.chen@intel.com> > > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > > invalid escape sequence \C > > > > Thanks Pedro. > > > > I thought about using / instead of \\ but in many places, the path > separator \\ is still used across the code. > > But after looking at the usage of path separator in other parts of > the code. I decided to go with \\. > > > > For example: > > In the same file: > > 2953 : MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % > > (self.OutputPath, PcdValueCommonPath) > > > > 2842: if sys.platform == "win32": > > MakeApp = MakeApp + 'APPFILE = %s\\%s.exe\n' % > (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % > (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % > (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, > PcdValueCommonName)) + 'INC = ' > > > > Hence to align with the usage of path separator for "win32", I have > used the \\ instead of /. > > > > Hope this is fine. > > > > Regards, > > JP > > > > -----Original Message----- > > From: Pedro Falcato <pedro.falcato@gmail.com> > > Sent: Tuesday, February 6, 2024 10:14 PM > > To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com> > > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D > > <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; > Liming > > Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; > > Chen, Christine <yuwei.chen@intel.com> > > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > > invalid escape sequence \C > > > > On Tue, Feb 6, 2024 at 7:02 AM Jayaprakash, N > <n.jayaprakash@intel.com> wrote: > >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 > >> > >> This commit fixes the issue reported through BZ4666. > >> The Syntax warning related to invalid escape sequence for \C is seen > >> on Windows OS based builds of edk2 sources. > >> On Windows the path seperator needs to prefixed with \ so > essentially > >> we need to use \\ as path seperator. > >> > >> Cc: Rebecca Cran <rebecca@bsdio.com> > >> Cc: Michael D Kinney <michael.d.kinney@intel.com> > >> Cc: Laszlo Ersek <lersek@redhat.com> > >> Cc: Liming Gao <gaoliming@byosoft.com.cn> > >> Cc: Bob Feng <bob.c.feng@intel.com> > >> Cc: Yuwei Chen <yuwei.chen@intel.com> > >> Cc: Jayaprakash N <n.jayaprakash@intel.com> > >> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> > >> --- > >> BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py > >> b/BaseTools/Source/Python/Workspace/DscBuildData.py > >> index 4768099343..b69d406249 100644 > >> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > >> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > >> @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): > >> for include_file in IncFileList: > >> MakeApp += "$(OBJECTS) : %s\n" % include_file > >> if sys.platform == "win32": > >> - PcdValueCommonPath = > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], > "Source\C\Common\PcdValueCommon.c")) > >> + PcdValueCommonPath = > >> + > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH" > >> + ], "Source\\C\\Common\\PcdValueCommon.c")) > > AIUI, changing the \ to / would also work (and it would be > prettier/more readable), since we're calling normpath right after. > > > > -- > > Pedro > > > > > > > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115468): https://edk2.groups.io/g/devel/message/115468 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C 2024-02-14 17:25 ` Michael D Kinney @ 2024-02-15 3:47 ` Jayaprakash, N 0 siblings, 0 replies; 13+ messages in thread From: Jayaprakash, N @ 2024-02-15 3:47 UTC (permalink / raw) To: Kinney, Michael D, Rebecca Cran, devel@edk2.groups.io, Pedro Falcato, Leif Lindholm, Andrew Fish (afish@apple.com), Gao, Liming Cc: Laszlo Ersek, Liming Gao, Feng, Bob C, Chen, Christine Thanks Mike, fully agree on this. It doesn't influence any behavior / output so it can definitely wait. Regards, JP -----Original Message----- From: Kinney, Michael D <michael.d.kinney@intel.com> Sent: Wednesday, February 14, 2024 10:55 PM To: Jayaprakash, N <n.jayaprakash@intel.com>; Rebecca Cran <rebecca@bsdio.com>; devel@edk2.groups.io; Pedro Falcato <pedro.falcato@gmail.com>; Leif Lindholm <llindhol@qti.qualcomm.com>; Andrew Fish (afish@apple.com) <afish@apple.com>; Gao, Liming <gaoliming@byosoft.com.cn> Cc: Laszlo Ersek <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com> Subject: RE: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C Hi JP, I agree this is a simple change and the review was started before the soft freeze, but a review by the maintainer did not occur until the hard freeze. This means it needs to meet the critical bug criteria. This change removes an incorrect warning message from the build log, but does not appear to have any impact on build behavior/output. I recommend this patch merge be deferred until after the edk2-stable202402 release. Thanks, Mike > -----Original Message----- > From: Jayaprakash, N <n.jayaprakash@intel.com> > Sent: Wednesday, February 14, 2024 7:10 AM > To: Rebecca Cran <rebecca@bsdio.com>; devel@edk2.groups.io; Pedro > Falcato <pedro.falcato@gmail.com> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek > <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob > C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> > Subject: RE: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > invalid escape sequence \C > > Thanks Rebecca for the review. > > This is an harmless simple change > Will it be considered for the Feb 2024 stable release of edk2? > > Regards, > JP > -----Original Message----- > From: Rebecca Cran <rebecca@bsdio.com> > Sent: Wednesday, February 14, 2024 8:33 PM > To: Jayaprakash, N <n.jayaprakash@intel.com>; devel@edk2.groups.io; > Pedro Falcato <pedro.falcato@gmail.com> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek > <lersek@redhat.com>; Liming Gao <gaoliming@byosoft.com.cn>; Feng, Bob > C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com> > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > invalid escape sequence \C > > Reviewed-by: Rebecca Cran <rebecca@bsdio.com> > > > On 2/13/24 09:24, Jayaprakash, N wrote: > > Could one of the maintainers of this package review this patch? > > > > Regards, > > JP > > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of > > Jayaprakash, N > > Sent: Friday, February 9, 2024 4:07 PM > > To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>; > > Pedro Falcato <pedro.falcato@gmail.com> > > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D > > <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; > Liming > > Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; > > Chen, Christine <yuwei.chen@intel.com> > > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > > invalid escape sequence \C > > > > Hi Pedro, > > > > Do you agree with the below thoughts? Let me know if you have any > questions. > > > > Regards, > > JP > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of > > Jayaprakash, N > > Sent: Wednesday, February 7, 2024 8:58 AM > > To: Pedro Falcato <pedro.falcato@gmail.com>; devel@edk2.groups.io > > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D > > <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; > Liming > > Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; > > Chen, Christine <yuwei.chen@intel.com> > > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > > invalid escape sequence \C > > > > Thanks Pedro. > > > > I thought about using / instead of \\ but in many places, the path > separator \\ is still used across the code. > > But after looking at the usage of path separator in other parts of > the code. I decided to go with \\. > > > > For example: > > In the same file: > > 2953 : MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % > > (self.OutputPath, PcdValueCommonPath) > > > > 2842: if sys.platform == "win32": > > MakeApp = MakeApp + 'APPFILE = %s\\%s.exe\n' % > (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % > (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % > (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, > PcdValueCommonName)) + 'INC = ' > > > > Hence to align with the usage of path separator for "win32", I have > used the \\ instead of /. > > > > Hope this is fine. > > > > Regards, > > JP > > > > -----Original Message----- > > From: Pedro Falcato <pedro.falcato@gmail.com> > > Sent: Tuesday, February 6, 2024 10:14 PM > > To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com> > > Cc: Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D > > <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>; > Liming > > Gao <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; > > Chen, Christine <yuwei.chen@intel.com> > > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning > > invalid escape sequence \C > > > > On Tue, Feb 6, 2024 at 7:02 AM Jayaprakash, N > <n.jayaprakash@intel.com> wrote: > >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 > >> > >> This commit fixes the issue reported through BZ4666. > >> The Syntax warning related to invalid escape sequence for \C is > >> seen on Windows OS based builds of edk2 sources. > >> On Windows the path seperator needs to prefixed with \ so > essentially > >> we need to use \\ as path seperator. > >> > >> Cc: Rebecca Cran <rebecca@bsdio.com> > >> Cc: Michael D Kinney <michael.d.kinney@intel.com> > >> Cc: Laszlo Ersek <lersek@redhat.com> > >> Cc: Liming Gao <gaoliming@byosoft.com.cn> > >> Cc: Bob Feng <bob.c.feng@intel.com> > >> Cc: Yuwei Chen <yuwei.chen@intel.com> > >> Cc: Jayaprakash N <n.jayaprakash@intel.com> > >> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> > >> --- > >> BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py > >> b/BaseTools/Source/Python/Workspace/DscBuildData.py > >> index 4768099343..b69d406249 100644 > >> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > >> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > >> @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): > >> for include_file in IncFileList: > >> MakeApp += "$(OBJECTS) : %s\n" % include_file > >> if sys.platform == "win32": > >> - PcdValueCommonPath = > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], > "Source\C\Common\PcdValueCommon.c")) > >> + PcdValueCommonPath = > >> + > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH" > >> + ], "Source\\C\\Common\\PcdValueCommon.c")) > > AIUI, changing the \ to / would also work (and it would be > prettier/more readable), since we're calling normpath right after. > > > > -- > > Pedro > > > > > > > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115486): https://edk2.groups.io/g/devel/message/115486 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C 2024-02-06 7:02 ` [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C Jayaprakash, N 2024-02-06 14:32 ` Laszlo Ersek 2024-02-06 16:43 ` Pedro Falcato @ 2024-02-28 0:29 ` Rebecca Cran 2 siblings, 0 replies; 13+ messages in thread From: Rebecca Cran @ 2024-02-28 0:29 UTC (permalink / raw) To: Jayaprakash N, devel Cc: Michael D Kinney, Laszlo Ersek, Liming Gao, Bob Feng, Yuwei Chen Merged as 3e91e421365027ee3e655feab33c67a4f544c777. -- Rebecca Cran On 2/6/24 00:02, Jayaprakash N wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 > > This commit fixes the issue reported through BZ4666. > The Syntax warning related to invalid escape sequence > for \C is seen on Windows OS based builds of edk2 sources. > On Windows the path seperator needs to prefixed with \ > so essentially we need to use \\ as path seperator. > > Cc: Rebecca Cran <rebecca@bsdio.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Laszlo Ersek <lersek@redhat.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Bob Feng <bob.c.feng@intel.com> > Cc: Yuwei Chen <yuwei.chen@intel.com> > Cc: Jayaprakash N <n.jayaprakash@intel.com> > Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> > --- > BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py > index 4768099343..b69d406249 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): > for include_file in IncFileList: > MakeApp += "$(OBJECTS) : %s\n" % include_file > if sys.platform == "win32": > - PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) > + PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\\C\\Common\\PcdValueCommon.c")) > MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath) > MakeApp = MakeApp + '\tcopy /y %s $@\n' % (PcdValueCommonPath) > else: -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116066): https://edk2.groups.io/g/devel/message/116066 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-02-28 0:29 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-02-06 7:02 [edk2-devel] [edk2 Patch 0/1] Fix invalid escape sequence \C syntax warning Jayaprakash, N 2024-02-06 7:02 ` [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C Jayaprakash, N 2024-02-06 14:32 ` Laszlo Ersek 2024-02-06 16:43 ` Pedro Falcato 2024-02-07 3:27 ` Jayaprakash, N [not found] ` <17B176ECA49BD037.2925@groups.io> 2024-02-09 10:37 ` Jayaprakash, N 2024-02-09 14:24 ` Pedro Falcato [not found] ` <17B22B806B304043.15017@groups.io> 2024-02-13 16:24 ` Jayaprakash, N 2024-02-14 15:03 ` Rebecca Cran 2024-02-14 15:10 ` Jayaprakash, N 2024-02-14 17:25 ` Michael D Kinney 2024-02-15 3:47 ` Jayaprakash, N 2024-02-28 0:29 ` Rebecca Cran
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox