Re: MSVC 2017+ Toolset Support

Bill Deegan <bill-cJFiu+DHMVC5azolltMz9laTQe2KTcn/@public.gmane.org> Mon, 10 Aug 2020 16:01:17 -0700
Newsgroups gmane.comp.programming.tools.scons.devel
Message-ID <CAEyG4CGC28JFAYXnJo+uur-Nt+AsoXzMe0WY5bkQ+zgVZ_Redw@mail.gmail.com>
--===============1766262490045664488==
Content-Type: multipart/alternative; boundary="00000000000050573205ac8defad"

--00000000000050573205ac8defad
Content-Type: text/plain; charset="UTF-8"

Can I end up with 14.1 installed in both a MSVC2017 and MSVC2019 install
(and of course also all  the flavors of MSVC, build tools, express,
community, enterprise), for a possible total of 8 separate installs? (or
some smaller non singular number?)

I'm not a fan of the more complicated syntax for MSVC_VERSION and would
rather split out the selection to either separate variables for product,
toolset, and product version and/or a callable which handles selection.
MSVC_VERSION -> sounds like after MSVC2017 defaults to latest installed
toolset unless you set toolset version
MSVC_PRODUCT_VERSION -> Enterprise, Professional, Community, Express, or
not set
MSVC_TOOLSET_VERSION  -> This may only apply for MSVC2017 or above (or
could be used if MSVC_VERSION is not set for MSVC < 2017, though that would
likely introduce confusion

MSVC_SELECTOR -> Callable (too allow more flexibility than static versions
above)

Otherwise you end up encoding the information in a string and then you have
to decode it.
Seems more complicated than necessary, and we don't have any other syntaxes
embedded in variables thus far.

I realize you have lots of time invested in your MSVC_VERSION
implementation you've explained, but the goal here is to be consistent with
expected behavior in the face of changed MSVC.

(And yes. I know.. "Foolish consistency is the hobgoblin of little minds",
but I think in this case it's not foolish)

Welcome feedback on above.




On Sun, Aug 9, 2020 at 2:50 PM Joseph Brill <[email protected]>
wrote:

> This email is an attempt to focus the discussion concerning support for
> MSVC toolsets moving forward in a rational, dispassionate discourse.
>
> I am advocating a minor shift in orientation or "world view" for MSVC 2017
> and later: the semantic transition from thinking of the msvc version as a
> product to thinking of the msvc version as a toolset.  This actually makes
> the implementation of toolset support easier.
>
> There is a working version of the support for toolsets at varying levels
> of precision that can be enabled and disabled.  The intent is that a
> command-line switch could be added to enable the toolset specific
> capabilities.  By default, the toolset specific capabilities would be
> disabled in which case the code behaves exactly like the current master.
> This would allow field testing and evaluation of the functionality in other
> environments and to easily test the differences between the current master
> and the toolset functionality.  The functional aspects are feature
> complete.  The working version is a product of more than one man-month of
> full-time development activity and the result of the third iteration of
> implementation strategy.
>
> Existing PR #3717 was closed and the branch renamed due in part to make it
> easier to identify and maintain for myself as I fear that I might be time
> limited in the near term and due in part to the existing discussion
> unraveling fairly quickly with dim prospects of inclusion moving forward.  Despite
> being closed, I recommend viewing the "documentation" (the PR text and the
> first comment) and the vc.py code difference in PR #3717.  At any time the
> PR request can be reopened.  I would need a git guru to walk me through
> associating the new branch name with the "old" PR.
>
> The implementation knocks an item or two off the internal vc.py TODO list
> such as a single vswhere query and processing the json results for all
> known installations.  Ranked toolset lists are constructed by host/target.
> The ranking takes into account the toolset version and product type.  A
> single toolset instance may be a member of multiple toolset lists.
> Expensive lookups are "runtime memoized/cached" so that they are only
> computed once.  While there is a fair amount of initialization, the
> processing burden is based on the number of products installed and the
> number of toolsets for each product.  Typical environments likely have a
> single product installation with a spartan number of different toolsets
> installed. There is nothing particularly "clever" done in the
> implementation and should not be a maintenance burden.  The bulk of the
> toolset support implementation follows the code in the existing master
> (i.e., the bottom of the file).  The modifications to support toolsets
> weighs in at approximately 1400 lines of code.
>
> Prior to MSVS 2017, there was a direct 1:1 mapping between the msvc
> *product* and the msvc *toolset*. The toolset might be upgraded in an
> update or service pack but there was no way to select a specific toolset as
> side-by-side installations were not supported.  That changed with the
> release of MSVC 2017 which allows multiple side-by-side toolset
> installations by target.  MSVC 2017 and later, can be viewed as *toolset* oriented
> (i.e., a MSVC 2019 installation can be viewed as a container for 14.1X,
> 14.2X, and transparently the 14.0 toolsets).  Moving forward, I believe
> that it will be advantageous to change from a *product* orientation to a
> *toolset* orientation.  This change is only for the 2017 and later
> installations and currently really only affects 2017.
>
> With MSVC 2017 and MSVC 2019, an SCons version request of "14.1" or
> "14.2", respectively, *is a toolset request* that cannot be specified at
> a finer granularity. The current msvc behavior uses the *default toolset* which
> is generally the newest installed *toolset* version when the
> "--vcvars_ver" argument is not specified for the vcvars batch file.
>
> For example, a version request of "14.1" is likely to use the
> "14.16.27023" toolset when MSVC 2017 is installed. Effectively, the *product
> request* is a *toolset request* identical to "find the newest toolset
> version installed that starts with '14.1'". However, "14.2" (MSVC 2019)
> will return a *toolset* based on the latest update which likely varies
> across users and computers.  Currently, a request for "14.1" will fail if
> MSVC 2019 is installed with the 14.1 toolset.  With a toolset orientation,
> a 14.1 toolset request would be satisfied first by the native product
> (i.e., MSVC 2017) for the toolset and then by the latest product that
> contains the user specified toolset for a given host/target combination.
> This two-stage query, if necessary, is implemented in the working toolset
> oriented version.
>
> Currently, the actual toolset versions used for 2017 and 2019 are based on
> end-user's installation options and frequency of updates. While two
> different users may be using the same *product* (e.g., 2019) they may not
> be using the same *toolset*. Similarly, the installed toolset version is
> not necessarily the same for all host/target combinations within a given
> product installation.  The current implementation uses a default *toolset* within
> a product across different users and environments, which may not be the
> same for all instances, but currently cannot use a *toolset* across
> product installations.
>
> There may be many reasons (e.g., enterprise and/or customer requirements)
> that build scripts are tied to a specific toolset.  If a build depends on
> the 14.1 *toolset* it hardly seems as important in which *product* container
> it is installed from an end-user's perspective given the two-stage
> selection rule described earlier.  Given the same toolset, the produced
> binaries should be binary compatible independent of the product
> installation.  The same issue will arise when the next MSVC *product* is
> released and end-users desire to use the 14.2X *toolset* combination in
> the new product container.
>
> At present, the shift in toolset orientation would only affect user's that
> desire the 14.1 toolset and do not have MSVC 2017 installed.  In this case,
> the only other product that can be used is MSVC 2019.  This isolates the
> effects of changes to a single version of MSVC.
>
> This could have a tangible side-effect of making build scripts more
> portable: the build scripts can be tied to a toolset rather than a
> toolset/product combination.  Although if it is desired to specify the
> toolset/product combination that is supported as well.
>
> The MSVC_VERSION format was expanded to allow:
>
>    - specifying an individual toolset at varying degrees of precision:
>       - "14.1"
>       - "14.16"
>       - "14.16.27"
>       - "14.16.27023"
>    - specifying individual product types (attached to a specific toolset
>    or a product):
>       - Enterprise: "14.26Ent"
>       - Professional: "14.2Pro"
>       - Community: "14.26.27Com"
>       - Build Tools: "14.2BT"
>       - Express: "14.1Exp"
>    - a right assignment operator ("->") that maps a specific toolset to a
>    defined product version with an optional product type:
>       - "14.0->14.2" use the the 14.0 toolset via a 2019 installation
>       - "14.1->14.2BT" use the 14.1 toolset via a 2019 Build Tools
>       installation
>       - "14.1->14.2Com" use the 14.1 toolset via a 2019 Community
>       installation
>
> The translation of the extended version specification to a supplementary
> internal data structure is done in exactly one source code location:
> msvc_setup_env.  All existing code continues to operate on the "NN.M"
> format for MSVC_VERSION as before.  Existing msvc/msvs test suites pass all
> tests.  However, issues with the extended format being used prior to entry
> in vc.py script have yet to be identified, if any.  The working version is
> completely self-contained in the vc.py script.
>
> Without a product qualifier (e.g., "BT"), there is a *subtle but
> significant* change semantically: the product selected will be the
> newest/latest toolset that matches the user specification within installed
> toolsets for a given (host,target) combination. Effectively, without a
> product qualifier, any product type could be returned based on the
> installed toolsets. This only affects multiple installations of the same
> product version (e.g., 14.1 and 14.Exp and/or 14.2Com and 14.2BT).  For end
> users that only have one product installed, there is no reason to specify a
> product type.
>
> This means that a user does not need to specify "14.1Exp" explicitly if
> there is a single 14.1 product installation. On the flip side, it also
> means that "14.1Exp" may be returned for a "14.1" request. In local
> testing, "14.1Exp" was returned for an "arm" target. In the local
> installations of 14.1 Community and 14.1 Express, the "newest" toolset for
> an arm target was in the 14.1 Express installation as it was installed the
> most recently.  With a product qualifier, a specific product version and
> type is selected.
>
> To be clear, I do not need any fixes, enhancements, and am not reporting
> any bugs.  The toolset version development was done in the spirit of
> contributing to software that I have used since 2.X.  I had a development
> window to contribute to the windows/msvc support and in process address two
> of the outstanding msvc items on the issues list.  I was motivated by
> both the post in the scons users mailing list shown below and issue #3664.
> As I am familiar with the msvc detection code, my initial thoughts were
> "how hard could it be?"
>
> Regards,
>
> Joe
>
> https://pairlist4.pair.net/pipermail/scons-users/2020-June/008216.html
>
> >* The problem is scons don't find any 14.1(2017) installation, he only find
> *>* 14.2(2019).
> *> >* Is there something I could do to tell scons that 141 is installed somewhere
> *>* in vs2019 installation?
> *
> at the moment, no... it's a work in progress.
>
> See https://github.com/SCons/scons/issues/3664
>
> There wasn't really a "Windows native" person involved in the most
> recent times, so we didn't end up understanding about the model of
> multiple versions under one VS install - and in particular that people
> would want to get 14.1 from VS2019 rather than keep VS2017 installed.
> For the most recent VS installs, vswhere is used to detect them, but we
> find only the "default version" under each product vswhere reports, so
> 14.2.latest for 2019, 14.1 for 2017.
>
> _______________________________________________
> Scons-dev mailing list
> [email protected]
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>

--00000000000050573205ac8defad
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Can I end up with 14.1 installed in both a MSVC2017 a=
nd MSVC2019 install (and of course also all=C2=A0 the flavors of MSVC, buil=
d tools, express, community, enterprise), for a possible total of 8 separat=
e installs? (or some smaller non singular number?)</div><div><br></div><div=
>I&#39;m not a fan of the more complicated syntax for MSVC_VERSION and woul=
d rather split out the selection to either separate variables for product, =
toolset, and product version and/or a callable which handles selection.</di=
v><div>MSVC_VERSION -&gt; sounds like after MSVC2017 defaults to latest ins=
talled toolset unless you set toolset version<br></div><div>MSVC_PRODUCT_VE=
RSION -&gt; Enterprise, Professional, Community, Express, or not set<br></d=
iv><div>MSVC_TOOLSET_VERSION=C2=A0 -&gt; This may only apply for MSVC2017 o=
r above (or could be used if MSVC_VERSION is not set for MSVC &lt; 2017, th=
ough that would likely introduce confusion</div><div><br></div><div>MSVC_SE=
LECTOR -&gt; Callable (too allow more flexibility than static versions abov=
e)<br></div><div><br></div><div>Otherwise you end up encoding the informati=
on in a string and then you have to decode it.</div><div>Seems more complic=
ated than necessary, and we don&#39;t have any other syntaxes embedded in v=
ariables thus far.</div><div><br></div><div>I realize you have lots of time=
 invested in your MSVC_VERSION implementation you&#39;ve explained, but the=
 goal here is to be consistent with expected behavior in the face of change=
d MSVC.</div><div><br></div><div>(And yes. I know.. &quot;Foolish consisten=
cy is the hobgoblin of little minds&quot;, but I think in this case it&#39;=
s not foolish)</div><div><br></div><div>Welcome feedback on above.<br></div=
><div><br></div><div><br></div><div><br></div></div><br><div class=3D"gmail=
_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Aug 9, 2020 at 2:50 P=
M Joseph Brill &lt;<a href=3D"mailto:[email protected]">joseph.c.bri=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin=
g-left:1ex"><div dir=3D"ltr"><p style=3D"margin:0.5rem 0px 1rem;color:rgb(5=
1,51,51);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,=
Helvetica,Helvetica,Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Appl=
e Color Emoji&quot;;font-size:17.9776px"><span style=3D"font-size:17.9776px=
">This email is an attempt to focus the discussion concerning=C2=A0support =
for MSVC toolsets moving forward in a rational, dispassionate discourse.</s=
pan></p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51,51,51);font-family:=
-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Helvetica,A=
rial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color Emoji&quot;;f=
ont-size:17.9776px">I am advocating a minor shift in orientation or &quot;w=
orld view&quot; for MSVC 2017 and later: the semantic transition from think=
ing of the msvc version as a product to thinking of the msvc version as a t=
oolset.=C2=A0 This actually makes the implementation of toolset support eas=
ier.</p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51,51,51);font-family:=
-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Helvetica,A=
rial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color Emoji&quot;;f=
ont-size:17.9776px"><span style=3D"font-size:17.9776px">There is a working =
version of the support for </span>toolsets<span style=3D"font-size:17.9776p=
x"> at varying levels of precision that can be enabled and disabled.=C2=A0 =
The intent is that a command-line switch could be added to enable the tools=
et specific capabilities.=C2=A0 By default, the toolset specific capabiliti=
es would be disabled in which case the code behaves exactly like </span>the=
<span style=3D"font-size:17.9776px">=C2=A0current master.=C2=A0 This would =
allow field testing and evaluation of the functionality in other environmen=
ts and to easily test the=C2=A0differences between the current master and t=
he toolset functionality.=C2=A0 The functional aspects are feature complete=
.=C2=A0 The working version is a product of more than one man-month of full=
-time development activity and the result of the third iteration of impleme=
ntation strategy.</span></p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51=
,51,51);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,H=
elvetica,Helvetica,Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple=
 Color Emoji&quot;;font-size:17.9776px"><span style=3D"font-size:17.9776px"=
>Existing PR #3717 was closed and the branch renamed due in part to make it=
 easier to identify and maintain for myself as I fear that I might be time =
limited in the near term and due in part to the existing discussion unravel=
ing fairly quickly with dim=C2=A0prospects of inclusion moving forward.=C2=
=A0=C2=A0</span><span style=3D"font-size:17.9776px">Despite being closed, I=
 recommend viewing the &quot;documentation&quot; (the PR text and the first=
 comment) and the vc.py code difference in PR #3717.=C2=A0 At any time the =
PR request can be reopened.=C2=A0 I would need a git guru to walk me throug=
h associating the new branch name with the &quot;old&quot; PR.</span></p><p=
 style=3D"margin:0.5rem 0px 1rem;color:rgb(51,51,51);font-family:-apple-sys=
tem,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Helvetica,Arial,sans-=
serif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color Emoji&quot;;font-size:1=
7.9776px"><span style=3D"font-size:17.9776px">The implementation knocks an =
item or two off the internal vc.py TODO list such as a single vswhere=C2=A0=
query and processing the json results for all known installations.=C2=A0 Ra=
nked toolset lists are constructed by host/target.=C2=A0 The ranking takes =
into account the toolset version and product type.=C2=A0 A single toolset i=
nstance may be a member of multiple toolset lists.=C2=A0 Expensive lookups =
are &quot;runtime memoized/cached&quot; so that they are only computed once=
.=C2=A0 While there is a fair amount of initialization, the processing burd=
en is based on the number of products installed and the number of toolsets =
for each product.=C2=A0 Typical environments likely have a single product i=
nstallation with a spartan number of different toolsets installed. There is=
 nothing particularly &quot;clever&quot; done in the implementation and sho=
uld not be a maintenance burden.=C2=A0 The bulk of the toolset support impl=
ementation follows the code in the existing master (i.e., the bottom of the=
 file).=C2=A0 The modifications to support toolsets weighs in at approximat=
ely=C2=A01400 lines of code.</span><br></p><p style=3D"margin:0.5rem 0px 1r=
em;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,&quot;S=
egoe UI&quot;,Helvetica,Helvetica,Arial,sans-serif,&quot;Segoe UI Symbol&qu=
ot;,&quot;Apple Color Emoji&quot;;font-size:17.9776px">Prior to MSVS 2017, =
there was a direct 1:1 mapping between the msvc=C2=A0<em>product</em>=C2=A0=
and the msvc=C2=A0<em>toolset</em>. The toolset might be upgraded in an upd=
ate or service pack but there was no way to select a specific toolset as si=
de-by-side installations were not supported.=C2=A0 That changed with the re=
lease of MSVC 2017 which allows multiple side-by-side toolset installations=
 by target.=C2=A0=C2=A0<span style=3D"font-size:17.9776px">MSVC 2017 and la=
ter, can be viewed as=C2=A0</span><span style=3D"font-size:17.9776px"><em>t=
oolset</em></span><span style=3D"font-size:17.9776px">=C2=A0oriented (i.e.,=
 a MSVC 2019 installation can be viewed as a container for 14.1X, 14.2X, an=
d transparently the 14.0 toolsets).=C2=A0 Moving forward, I believe that it=
 will be advantageous to change from a=C2=A0</span><span style=3D"font-size=
:17.9776px"><em>product</em></span><span style=3D"font-size:17.9776px">=C2=
=A0orientation to a <i>toolset</i> orientation.=C2=A0 This change is only f=
or the 2017 and later installations and currently really only affects 2017.=
</span></p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51,51,51);font-fami=
ly:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Helvetic=
a,Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color Emoji&quot=
;;font-size:17.9776px"></p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51,=
51,51);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,He=
lvetica,Helvetica,Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple =
Color Emoji&quot;;font-size:17.9776px">With MSVC 2017 and MSVC 2019, an SCo=
ns version request of &quot;14.1&quot; or &quot;14.2&quot;, respectively,=
=C2=A0<em>is a toolset request</em>=C2=A0that cannot be specified at a fine=
r granularity. The current msvc behavior uses the=C2=A0<em>default toolset<=
/em>=C2=A0which is generally the newest installed=C2=A0<em>toolset</em>=C2=
=A0version when the &quot;--vcvars_ver&quot; argument is not specified for =
the vcvars batch file.</p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51,5=
1,51);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Hel=
vetica,Helvetica,Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple C=
olor Emoji&quot;;font-size:17.9776px">For example, a version request of &qu=
ot;14.1&quot; is likely to use the &quot;14.16.27023&quot; toolset when MSV=
C 2017 is installed. Effectively, the=C2=A0<em>product request</em>=C2=A0is=
 a=C2=A0<em>toolset request</em>=C2=A0identical to &quot;find the newest to=
olset version installed that starts with &#39;14.1&#39;&quot;. However, &qu=
ot;14.2&quot; (MSVC 2019) will return a=C2=A0<em>toolset</em>=C2=A0based on=
 the latest update which likely varies across users and computers.=C2=A0 Cu=
rrently, a request for &quot;14.1&quot; will fail if MSVC 2019 is installed=
 with the 14.1 toolset.=C2=A0 With a toolset orientation, a 14.1 toolset re=
quest would be satisfied first by the native product (i.e., MSVC 2017) for =
the toolset and then by the latest product that contains the user specified=
 toolset for a given host/target combination.=C2=A0 This two-stage query, i=
f necessary, is implemented in the working toolset oriented version.</p><p =
style=3D"margin:0.5rem 0px 1rem;color:rgb(51,51,51);font-family:-apple-syst=
em,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Helvetica,Arial,sans-s=
erif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color Emoji&quot;;font-size:17=
.9776px">Currently, the actual toolset versions used for 2017 and 2019 are =
based on end-user&#39;s installation options and frequency of updates. Whil=
e two different users may be using the same=C2=A0<em>product</em>=C2=A0(e.g=
., 2019) they may not be using the same=C2=A0<em>toolset</em>. Similarly, t=
he installed toolset version is not necessarily the same for all host/targe=
t combinations within a given product installation.=C2=A0 T<span style=3D"f=
ont-size:17.9776px">he current implementation uses a default=C2=A0</span><e=
m style=3D"font-size:17.9776px">toolset</em><span style=3D"font-size:17.977=
6px">=C2=A0within a product across different users and environments, which =
may not be the same for all instances, but currently cannot use a=C2=A0</sp=
an><em style=3D"font-size:17.9776px">toolset</em><span style=3D"font-size:1=
7.9776px">=C2=A0across product installations.</span></p><p style=3D"margin:=
0.5rem 0px 1rem;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSyste=
mFont,&quot;Segoe UI&quot;,Helvetica,Helvetica,Arial,sans-serif,&quot;Segoe=
 UI Symbol&quot;,&quot;Apple Color Emoji&quot;;font-size:17.9776px"><span s=
tyle=3D"font-size:17.9776px">There may be many reasons (e.g., enterprise an=
d/or customer requirements) that build scripts are tied to a specific tools=
et.=C2=A0 If a build depends on the 14.1=C2=A0</span><em style=3D"font-size=
:17.9776px">toolset</em><span style=3D"font-size:17.9776px">=C2=A0it hardly=
 seems as important in which=C2=A0</span><em style=3D"font-size:17.9776px">=
product</em><span style=3D"font-size:17.9776px">=C2=A0container it is insta=
lled from an end-user&#39;s perspective given the two-stage selection rule =
described=C2=A0earlier.=C2=A0 Given the same=C2=A0toolset, the produced bin=
aries should be binary compatible independent of the product installation.=
=C2=A0 The same issue will arise when the next MSVC=C2=A0</span><em style=
=3D"font-size:17.9776px">product</em><span style=3D"font-size:17.9776px">=
=C2=A0is released and end-users desire to use the 14.2X=C2=A0</span><em sty=
le=3D"font-size:17.9776px">toolset</em><span style=3D"font-size:17.9776px">=
=C2=A0combination in the new product container.</span><br></p><p style=3D"m=
argin:0.5rem 0px 1rem;color:rgb(51,51,51);font-family:-apple-system,BlinkMa=
cSystemFont,&quot;Segoe UI&quot;,Helvetica,Helvetica,Arial,sans-serif,&quot=
;Segoe UI Symbol&quot;,&quot;Apple Color Emoji&quot;;font-size:17.9776px">A=
t present, the shift in toolset orientation would only affect user&#39;s th=
at desire the 14.1 toolset and do not have MSVC 2017 installed.=C2=A0 In th=
is case, the only other product that can be used is MSVC 2019.=C2=A0 This i=
solates the effects of changes to a single version of MSVC.</p><p style=3D"=
margin:0.5rem 0px 1rem;color:rgb(51,51,51);font-family:-apple-system,BlinkM=
acSystemFont,&quot;Segoe UI&quot;,Helvetica,Helvetica,Arial,sans-serif,&quo=
t;Segoe UI Symbol&quot;,&quot;Apple Color Emoji&quot;;font-size:17.9776px">=
This could have a tangible side-effect of making build scripts more portabl=
e: the build scripts can be tied to a toolset rather than a toolset/product=
 combination.=C2=A0 Although if it is desired to specify the toolset/produc=
t combination that is supported as well.</p><p style=3D"margin:0.5rem 0px 1=
rem;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,&quot;=
Segoe UI&quot;,Helvetica,Helvetica,Arial,sans-serif,&quot;Segoe UI Symbol&q=
uot;,&quot;Apple Color Emoji&quot;;font-size:17.9776px"><span style=3D"font=
-size:17.9776px">The MSVC_VERSION format was expanded to allow:</span><br><=
/p><ul style=3D"margin:1.1em 0px;color:rgb(51,51,51);font-family:-apple-sys=
tem,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Helvetica,Arial,sans-=
serif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color Emoji&quot;;font-size:1=
7.9776px"><li style=3D"margin:0.6em 0.2em 0.6em 1em">specifying an individu=
al toolset at varying degrees of precision:<ul style=3D"margin:1.1em 0px"><=
li style=3D"margin:0.6em 0.2em 0.6em 1em;list-style:outside none square">&q=
uot;14.1&quot;</li><li style=3D"margin:0.6em 0.2em 0.6em 1em;list-style:out=
side none square">&quot;14.16&quot;</li><li style=3D"margin:0.6em 0.2em 0.6=
em 1em;list-style:outside none square">&quot;14.16.27&quot;</li><li style=
=3D"margin:0.6em 0.2em 0.6em 1em;list-style:outside none square">&quot;14.1=
6.27023&quot;</li></ul></li><li style=3D"margin:0.6em 0.2em 0.6em 1em">spec=
ifying individual product types (attached to a specific toolset=C2=A0<span =
style=3D"font-weight:600">or</span>=C2=A0a product):<ul style=3D"margin:1.1=
em 0px"><li style=3D"margin:0.6em 0.2em 0.6em 1em;list-style:outside none s=
quare">Enterprise: &quot;14.26Ent&quot;</li><li style=3D"margin:0.6em 0.2em=
 0.6em 1em;list-style:outside none square">Professional: &quot;14.2Pro&quot=
;</li><li style=3D"margin:0.6em 0.2em 0.6em 1em;list-style:outside none squ=
are">Community: &quot;14.26.27Com&quot;</li><li style=3D"margin:0.6em 0.2em=
 0.6em 1em;list-style:outside none square">Build Tools: &quot;14.2BT&quot;<=
/li><li style=3D"margin:0.6em 0.2em 0.6em 1em;list-style:outside none squar=
e">Express: &quot;14.1Exp&quot;</li></ul></li><li style=3D"margin:0.6em 0.2=
em 0.6em 1em">a right assignment operator (&quot;-&gt;&quot;) that maps a s=
pecific toolset to a defined product version with an optional product type:=
<ul style=3D"margin:1.1em 0px"><li style=3D"margin:0.6em 0.2em 0.6em 1em;li=
st-style:outside none square">&quot;14.0-&gt;14.2&quot; use the the 14.0 to=
olset via a 2019 installation</li><li style=3D"margin:0.6em 0.2em 0.6em 1em=
;list-style:outside none square">&quot;14.1-&gt;14.2BT&quot; use the 14.1 t=
oolset via a 2019 Build Tools installation</li><li style=3D"margin:0.6em 0.=
2em 0.6em 1em;list-style:outside none square">&quot;14.1-&gt;14.2Com&quot; =
use the 14.1 toolset via a 2019 Community installation</li></ul></li></ul><=
p style=3D"margin:0.5rem 0px 1rem;color:rgb(51,51,51);font-size:17.9776px;f=
ont-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,=
Helvetica,Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color Em=
oji&quot;"><span style=3D"font-size:17.9776px">The translation of the exten=
ded version specification to a supplementary internal data structure is don=
e in exactly one source code location: msvc_setup_env</span><span style=3D"=
font-size:17.9776px">.=C2=A0 All existing code continues to operate on the =
&quot;NN.M&quot; format for MSVC_VERSION as before.=C2=A0 Existing msvc/msv=
s test suites pass all tests.=C2=A0 However, issues with the extended forma=
t being used prior to entry in vc.py=C2=A0script have yet to be identified,=
 if any.=C2=A0 The working version is completely self-contained in the vc.p=
y script.</span></p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51,51,51);=
font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica=
,Helvetica,Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color E=
moji&quot;;font-size:17.9776px">Without a product qualifier (e.g., &quot;BT=
&quot;), there is a=C2=A0<em>subtle but significant</em>=C2=A0change semant=
ically: the product selected will be the newest/latest toolset that matches=
 the user specification within installed toolsets for a given (host,target)=
 combination. Effectively, without a product qualifier, any product type co=
uld be returned based on the installed toolsets. This only affects multiple=
 installations of the same product version (e.g., 14.1 and 14.Exp and/or 14=
.2Com and 14.2BT).=C2=A0 For end users that only have one product installed=
, there is no reason to specify a product type.</p><p style=3D"margin:0.5re=
m 0px 1rem;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont=
,&quot;Segoe UI&quot;,Helvetica,Helvetica,Arial,sans-serif,&quot;Segoe UI S=
ymbol&quot;,&quot;Apple Color Emoji&quot;;font-size:17.9776px">This means t=
hat a user does not need to specify &quot;14.1Exp&quot; explicitly if there=
 is a single 14.1 product installation. On the flip side, it also means tha=
t &quot;14.1Exp&quot; may be returned for a &quot;14.1&quot; request. In lo=
cal testing, &quot;14.1Exp&quot; was returned for an &quot;arm&quot; target=
. In the local installations of 14.1 Community and 14.1 Express, the &quot;=
newest&quot; toolset for an arm target was in the 14.1 Express installation=
 as it was installed the most recently.=C2=A0=C2=A0<span style=3D"font-size=
:17.9776px">With a product qualifier, a specific product version and type i=
s selected.</span></p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51,51,51=
);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helveti=
ca,Helvetica,Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color=
 Emoji&quot;;font-size:17.9776px"><span style=3D"font-size:17.9776px">To be=
 clear, I do not need any fixes, enhancements, and am not reporting any bug=
s.=C2=A0 The toolset version development was done in the spirit of contribu=
ting to software that I have used since 2.X.=C2=A0 I had a development wind=
ow to contribute to the windows/msvc support and in process address two of =
the outstanding msvc items on the issues list.=C2=A0 I</span><span style=3D=
"font-size:17.9776px">=C2=A0was motivated by both the post in the scons use=
rs mailing list shown below and issue #3664.=C2=A0 As I am familiar with th=
e msvc detection code, my initial thoughts were &quot;how hard could it be?=
&quot;</span></p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51,51,51);fon=
t-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,He=
lvetica,Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color Emoj=
i&quot;;font-size:17.9776px"><span style=3D"font-size:17.9776px">Regards,</=
span></p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51,51,51);font-family=
:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Helvetica,=
Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple Color Emoji&quot;;=
font-size:17.9776px">Joe</p><p style=3D"margin:0.5rem 0px 1rem;color:rgb(51=
,51,51);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,H=
elvetica,Helvetica,Arial,sans-serif,&quot;Segoe UI Symbol&quot;,&quot;Apple=
 Color Emoji&quot;;font-size:17.9776px"><a href=3D"https://pairlist4.pair.n=
et/pipermail/scons-users/2020-June/008216.html" target=3D"_blank">https://p=
airlist4.pair.net/pipermail/scons-users/2020-June/008216.html</a>=C2=A0=C2=
=A0<br></p><pre style=3D"white-space:pre-wrap;color:rgb(0,0,0)">&gt;<i> The=
 problem is scons don&#39;t find any 14.1(2017) installation, he only find
</i>&gt;<i> 14.2(2019).
</i>&gt;<i>=20
</i>&gt;<i> Is there something I could do to tell scons that 141 is install=
ed somewhere
</i>&gt;<i> in vs2019 installation?
</i>
at the moment, no... it&#39;s a work in progress.

See <a href=3D"https://github.com/SCons/scons/issues/3664" target=3D"_blank=
">https://github.com/SCons/scons/issues/3664</a>

There wasn&#39;t really a &quot;Windows native&quot; person involved in the=
 most
recent times, so we didn&#39;t end up understanding about the model of
multiple versions under one VS install - and in particular that people
would want to get 14.1 from VS2019 rather than keep VS2017 installed.
For the most recent VS installs, vswhere is used to detect them, but we
find only the &quot;default version&quot; under each product vswhere report=
s, so
14.2.latest for 2019, 14.1 for 2017.</pre></div>
_______________________________________________<br>
Scons-dev mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
g</a><br>
<a href=3D"https://pairlist2.pair.net/mailman/listinfo/scons-dev" rel=3D"no=
referrer" target=3D"_blank">https://pairlist2.pair.net/mailman/listinfo/sco=
ns-dev</a><br>
</blockquote></div>

--00000000000050573205ac8defad--

--===============1766262490045664488==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev

--===============1766262490045664488==--