[Scons-users] Need a better message when MSVC caching enabled

Eric Fahlgren ericfahlgren at gmail.com
Thu Feb 6 16:20:46 EST 2020


Looks good to me.

My code attempts to avoid the problem altogether by recreating the cache
whenever a path in any of the cache entries doesn't exist.  I can imagine
situations where this might produce false positives (someone has manually
modified the LIB or INCLUDE paths for some other build, which don't exist
in the current build or something like that), so maybe not a perfect
solution.  (And the means to determine the sections of the cache that
actually contain a path is also a bit hacky.)

On Thu, Feb 6, 2020 at 8:48 AM Mats Wichmann <mats at wichmann.us> wrote:

> On 2/1/20 7:33 AM, Mats Wichmann wrote:
> > On 1/31/20 8:58 PM, Eric Fahlgren wrote:
> >> So, I updated MSVC on a couple of machines today and all of a sudden I'm
> >> getting error messages about "cl not found".
> >>
> >>>>> scons: Reading SConscript files ...
> >>>>>
> >>>>> scons: warning: Could not find MSVC compiler 'cl', it may need to be
> >> installed separately with Visual Studio
> >>>>> File "SConstruct", line 54, in __init__
> >>
> >> I start digging in and the  path is pointing to the old version of the
> >> compiler, hmm where is this coming from?  A couple hours of hair pulling
> >> later I realize, oh $#!t, I've got SCONS_CACHE_MSVC_CONFIG turned on, so
> >> I delete ~/.scons_msvc_cache, voila, everything works fine.
> >>
> >> Could we enhance the warning message to also say something like "if you
> >> have caching enabled, it may be out of date, see <path-to-cache-file>"
> >> or something like that?
> >>
> >> I personally will never forget this again 😬, but it might help someone
> >> else in the future.
> >
> > I'll look at how to improve on it.  This was the reason the feature was
> > marked experimental, figured something would go awry somewhere.
>
> This PR is a proposal to change the warning message;
>
> https://github.com/SCons/scons/pull/3546
>
> I still need to look at the code you posted later in this thread.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200206/72cffc65/attachment.html>


More information about the Scons-users mailing list