From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mx.groups.io with SMTP id smtpd.web10.58721.1675702378221799642 for ; Mon, 06 Feb 2023 08:52:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Pc63x+/t; spf=pass (domain: gmail.com, ip: 209.85.215.179, mailfrom: joey.vagedes@gmail.com) Received: by mail-pg1-f179.google.com with SMTP id s8so6508673pgg.11 for ; Mon, 06 Feb 2023 08:52:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2ZAbuuLZa5bSpSQCcb9g9yJ62sBvarn87w5OuwPnGIM=; b=Pc63x+/ti9DSj0v5Jsk4ar2ErZ0BTwGJzJ/efT0hYQhg/6wzHoPVHxWVIabJsMsVIp 4elw1DhcYvSFUBUScxRoVRter7NFH+3fBWca54F2wobsEF3gSWmSdLgEeWWM+3cdJxh6 dlGUSzu0VHjYwjzfCVrmAL8nPdjmj58PUKIpYlBrZRDCf21Am32ZJCIv6V0Cf1x+3JgU sUPjQUyKbNYF2LKTllK8AYN2aoGClzgV2bP0qKWBY+/S6mE2oaNNPVK+mZQpFlNOMieY LIgN5gy0y5Zae8ezRJSQ8ftoH75O27BxkjO4aO7Ee1bnrynnzz9D24oMEc6s6sOmrtKD 7dDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2ZAbuuLZa5bSpSQCcb9g9yJ62sBvarn87w5OuwPnGIM=; b=4Vs3DQ7zTc/Rs/gCVkg49flNH1h61jMsoD8TW3unCrIq7ikzCrYSraF48yeyySPIX3 b/GvKx4GThmD5+hASxgKvjsQet4vZs2JdLWBLQhVqudcrI7cYvSbS9EZ+Zv8NGG55RFA cuOlY9ACwCSGXIvPaYTxTQ7WUjbEPbvjQlmVE3jUlcKrGXQuZZNgK2ughlFB9kyAb9EU 2nvoz5wgbioKCHHHL2itl0hvy3QUxWvYv5i5e1fDxcpRaOnCqFI327uFoKYnXGP7M2u+ a13IaRoxKPdLui5kxRIdhrMLuIuJyA6Q1ckG73d+ifyjFIDrPBjHJFnygtYkoCJiOjdf pM2g== X-Gm-Message-State: AO0yUKXZPV4ZyKbmPEpzIa3hbU8hXgQ1LEH2cV4rlRm/yWRiGWfhLmDU Q3FEsOqEVDy82Ful2KpqBwdIJMER1nxfxEKS3ys= X-Google-Smtp-Source: AK7set/UfQoEl9Bstk7Rk4h6ISHyhyqzmCeoUqOHThDorr3vXA0rU6QoRKWKYnNKWwupf4J+zsN4ZimWsnn6mwe2Y4s= X-Received: by 2002:aa7:9722:0:b0:593:f868:7442 with SMTP id k2-20020aa79722000000b00593f8687442mr12458pfg.38.1675702377368; Mon, 06 Feb 2023 08:52:57 -0800 (PST) MIME-Version: 1.0 References: <20230201202232.1410-1-joey.vagedes@gmail.com> <20230201202232.1410-2-joey.vagedes@gmail.com> In-Reply-To: From: Joey Vagedes Date: Mon, 6 Feb 2023 08:52:45 -0800 Message-ID: Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Update WindowsVsToolChain plugin To: Liming Gao , Michael D Kinney , Bob Feng , Yuwei Chen Cc: devel@edk2.groups.io, Michael Kubacki Content-Type: multipart/alternative; boundary="000000000000f3d37b05f40adc2f" --000000000000f3d37b05f40adc2f Content-Type: text/plain; charset="UTF-8" I received an Acked-by, but would like to request a Reviewed-by from a BaseTools maintainer. @gaoliming@byosoft.com.cn I would like to request that this change be included in the stable tag. This change updates edk2-pytool-library and edk2-pytool-extensions to the latest release, which brings in additional features and bug fixes for those building via edk2-pytools. There are no breaking changes, and no changes in the required python version. One of the changes made in edk2-pytool-library did result in a change in interface, which was necessary to provide a better user experience in handling errors for said function, however this PR provides a tested change (used by Project MU) for a script using the method in BaseTools. This change is also critical for the edk2-pytools project itself as that project can not successfully perform integration checks (which happen on every change to pytools) for edk2 on future PRs until this interface is changed. Thanks, Joey On Fri, Feb 3, 2023 at 7:43 PM Michael Kubacki wrote: > Acked-by: Michael Kubacki > > On 2/1/2023 3:22 PM, Joey Vagedes wrote: > > This patch updates edk2-pytool-library dependency to v0.13.0, which has > > an interface change to FindWithVsWhere. The BaseTools plugin uses this > > function, so it is being updated to account for the interface change. > > > > Cc: Bob Feng > > Cc: Liming Gao > > Cc: Yuwei Chen > > Cc: Michael D Kinney > > > > Signed-off-by: Joey Vagedes > > --- > > BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py | 16 > ++++++++++++---- > > pip-requirements.txt | 4 ++-- > > 2 files changed, 14 insertions(+), 6 deletions(-) > > > > diff --git a/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py > b/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py > > index 0fba2c1b5325..615b5ed6d131 100644 > > --- a/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py > > +++ b/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py > > @@ -177,15 +177,23 @@ class WindowsVsToolChain(IUefiBuildPlugin): > > > > > > def _get_vs_install_path(self, vs_version, varname): > > > > # check if already specified > > > > - path = shell_environment.GetEnvironment().get_shell_var(varname) > > > > + path = None > > > > + if varname is not None: > > > > + path = > shell_environment.GetEnvironment().get_shell_var(varname) > > > > + > > > > if(path is None): > > > > # Not specified...find latest > > > > - (rc, path) = FindWithVsWhere(vs_version=vs_version) > > > > - if rc == 0 and path is not None and os.path.exists(path): > > > > + try: > > > > + path = FindWithVsWhere(vs_version=vs_version) > > > > + except (EnvironmentError, ValueError, RuntimeError) as e: > > > > + self.Logger.error(str(e)) > > > > + return None > > > > + > > > > + if path is not None and os.path.exists(path): > > > > self.Logger.debug("Found VS instance for %s", > vs_version) > > > > else: > > > > self.Logger.error( > > > > - "Failed to find VS instance with VsWhere (%d)" % rc) > > > > + f"VsWhere successfully executed, but could not find > VS instance for {vs_version}.") > > > > return path > > > > > > > > def _get_vc_version(self, path, varname): > > > > diff --git a/pip-requirements.txt b/pip-requirements.txt > > index 4ffcadddd8cf..d3256ff1ade7 100644 > > --- a/pip-requirements.txt > > +++ b/pip-requirements.txt > > @@ -12,8 +12,8 @@ > > # https://www.python.org/dev/peps/pep-0440/#version-specifiers > > > > ## > > > > > > > > -edk2-pytool-library==0.12.1 > > > > -edk2-pytool-extensions~=0.20.0 > > > > +edk2-pytool-library==0.13.1 > > > > +edk2-pytool-extensions~=0.21.2 > > > > edk2-basetools==0.1.39 > > > > antlr4-python3-runtime==4.7.1 > > > > lcov-cobertura==2.0.2 > > > --000000000000f3d37b05f40adc2f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I = received an Acked-by, but would like to request a Reviewed-by from a BaseTo= ols maintainer.
@gaoliming@b= yosoft.com.cn I would like to request that this change be included in t= he stable tag.


This change updates edk2-pytool-library and= edk2-pytool-extensions to the latest release, which
brings in additiona= l features and bug fixes for those building via edk2-pytools.


There are no breaking changes, and no changes in the required python ve= rsion.


One of the changes made in edk2-pytool-library did = result in a change in interface, which was necessary
to provide a better= user experience in handling errors for said function, however this PR prov= ides a tested
change (used by Project MU) for a script using the method = in BaseTools.


This change is also critical for the edk2-py= tools project itself as that project can not successfully perform
integr= ation checks (which happen on every change to pytools) for edk2 on future P= Rs until this interface
is changed.


Thanks,

Joey<= /p>


On Fri, Feb 3, 2023 at 7:43 PM Michael Kubacki <mikuback@linux.microsof= t.com> wrote:
Acked-by: Michael Kubacki <michael.kubacki@microsoft.com>

On 2/1/2023 3:22 PM, Joey Vagedes wrote:
> This patch updates edk2-pytool-library dependency to v0.13.0, which ha= s
> an interface change to FindWithVsWhere. The BaseTools plugin uses this=
> function, so it is being updated to account for the interface change.<= br> >
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>
> Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com>
> ---
>=C2=A0 =C2=A0BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py = | 16 ++++++++++++----
>=C2=A0 =C2=A0pip-requirements.txt=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 |=C2=A0 4 ++--
>=C2=A0 =C2=A02 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py= b/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py
> index 0fba2c1b5325..615b5ed6d131 100644
> --- a/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py
> +++ b/BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py
> @@ -177,15 +177,23 @@ class WindowsVsToolChain(IUefiBuildPlugin):
>=C2=A0 =C2=A0
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0def _get_vs_install_path(self, vs_version, v= arname):
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# check if already specified >
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 path =3D shell_environment.GetEnvironment= ().get_shell_var(varname)
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 path =3D None
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if varname is not None:
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 path =3D shell_environment.= GetEnvironment().get_shell_var(varname)
>
> +
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if(path is None):
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Not specified.= ..find latest
>
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (rc, path) =3D FindWithVsWh= ere(vs_version=3Dvs_version)
>
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if rc =3D=3D 0 and path is = not None and os.path.exists(path):
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 try:
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 path =3D Find= WithVsWhere(vs_version=3Dvs_version)
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 except (EnvironmentError, V= alueError, RuntimeError) as e:
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self.Logger.e= rror(str(e))
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return None >
> +
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if path is not None and os.= path.exists(path):
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0se= lf.Logger.debug("Found VS instance for %s", vs_version)
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0se= lf.Logger.error(
>
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= "Failed to find VS instance with VsWhere (%d)" % rc)
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= f"VsWhere successfully executed, but could not find VS instance for {= vs_version}.")
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return path
>
>=C2=A0 =C2=A0
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0def _get_vc_version(self, path, varname): >
> diff --git a/pip-requirements.txt b/pip-requirements.txt
> index 4ffcadddd8cf..d3256ff1ade7 100644
> --- a/pip-requirements.txt
> +++ b/pip-requirements.txt
> @@ -12,8 +12,8 @@
>=C2=A0 =C2=A0# https://www.python.or= g/dev/peps/pep-0440/#version-specifiers
>
>=C2=A0 =C2=A0##
>
>=C2=A0 =C2=A0
>
> -edk2-pytool-library=3D=3D0.12.1
>
> -edk2-pytool-extensions~=3D0.20.0
>
> +edk2-pytool-library=3D=3D0.13.1
>
> +edk2-pytool-extensions~=3D0.21.2
>
>=C2=A0 =C2=A0edk2-basetools=3D=3D0.1.39
>
>=C2=A0 =C2=A0antlr4-python3-runtime=3D=3D4.7.1
>
>=C2=A0 =C2=A0lcov-cobertura=3D=3D2.0.2
>
--000000000000f3d37b05f40adc2f--