[Scons-users] Unexpected messge with configure

Bill Deegan bill at baddogconsulting.com
Fri Sep 7 14:16:11 EDT 2018


Should we change the messaging?
-Bill

On Fri, Sep 7, 2018 at 2:15 PM Bill Deegan <bill at baddogconsulting.com>
wrote:

> Jason,
>
> That seems reasonable, but maybe not simple..
>
> _Bill
>
> On Fri, Sep 7, 2018 at 2:10 PM Jason Kenny <dragon512 at live.com> wrote:
>
>> My first thoughts are that if we can tell if the result is cached to
>> return that value. If there are no cached values do the current behavior. I
>> am not sure how hard this would be however at the moment.
>> ideally the best behavior I think might be
>>
>>    - configure item has no cached value. Error as we currently do
>>    - configure item is cached, return the cached value
>>    - if we can detect that it has changed and would normally re-execute
>>       print a warning message that this is the case and note that the result of
>>       the build may change when it really runs
>>       - Not sure what to do with the cases of configuring items that
>>    don't cache ( such as custom functions that the user might have defined in
>>    a certain way ).
>>
>> Jason
>> ------------------------------
>> *From:* Scons-users <scons-users-bounces at scons.org> on behalf of Bill
>> Deegan <bill at baddogconsulting.com>
>> *Sent:* Friday, September 7, 2018 12:28 PM
>> *To:* SCons users mailing list
>> *Subject:* Re: [Scons-users] Unexpected messge with configure
>>
>> Jason,
>>
>> I'd say it's not a known issue, it's expected behavior.
>> See the docstring for the exception in question.
>>
>> What do you think SCons should do in this case?
>> The dry run would likely be affected by the results of any configure
>> checks which might write a file or run a process (both things which scons
>> is not supposed to do with --dry-run), so it's likely not possible to do a
>> dry-run with configure checks which write to the filesystem?
>>
>> -Bill
>>
>> class ConfigureDryRunError(SConfError):
>> """Raised when a file or directory needs to be updated during a Configure
>> process, but the user requested a dry-run"""
>> def __init__(self,target):
>> if not isinstance(target, SCons.Node.FS.File):
>> msg = 'Cannot create configure directory "%s" within a dry-run.' % str
>> (target)
>> else:
>> msg = 'Cannot update configure test "%s" within a dry-run.' % str(target)
>> SConfError.__init__(self,msg)
>>
>>
>> On Fri, Sep 7, 2018 at 1:20 PM Bill Deegan <bill at baddogconsulting.com>
>> wrote:
>>
>> Mats,
>>
>> How long does:
>> scons --help non-existant-target
>> Take?
>>
>> -Bill
>>
>> On Fri, Sep 7, 2018 at 12:26 PM Mats Wichmann <mats at wichmann.us> wrote:
>>
>> On 09/07/2018 09:55 AM, Jason Kenny wrote:
>> > I was adding some configure logic to a build I am working on. When
>> doing a dry run i now get this error:
>> >
>> > scons: *** Cannot update configure test ".sconf_temp/conftest_0" within
>> a dry-run.
>> > File "./../scons-3.0.1/SCons/Script/SConscript.py", line 614, in
>> __call__
>> >
>> > Is this a known issue with using configure in scons?
>>
>> I've run into it (you'll find my name on such questions in the mailing
>> list archive, afair).
>>
>> When you stop and think about it, running a configure test which means
>> compiling code sort of doesn't fit the definition of "dry run", though.
>>
>> this is a gray area to my way of thinking.  steps like cleaning, getting
>> help, and doing a dry-run are places where you don't want external work
>> to happen, just have scons go through the rules.  but sometimes you
>> don't know what all the dependencies actually are before you've run some
>> of those steps.
>>
>> we'll wait for the actual experts to pipe up :)
>>
>> ======
>> Aside:
>> on the project I'm trying to gradually bend into shape (it had lived for
>> a couple of years before I came around), which uses a variant directory
>> build, starting with the variant directory completely absent, "scons
>> --help" takes seven seconds, and leaves a variant directory with 12
>> object files and four libraries built. I *KNOW* that's wrong, but I
>> haven't yet figured out how to fix it without either breaking
>> everything, or special-casing stuff all over the place like
>>
>> if not env.GetOption('help') and not env.GetOption('clean'):
>>
>> guess we could put GetOption('dry-run') in that list too (would we have
>> to include all of the variants of that name? -n, --no-exec,
>> --just-print, --dry-run, --recon)
>>
>> with 200+ sconscripts, adding those cases is not appealing.
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>> <https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C9710a3affd9d4dfcc70d08d614e76e4f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636719381543572547&sdata=QVADywe8YsHd4BMjUt2rj1L%2F2NA3Sku%2F1LN9Sun12vo%3D&reserved=0>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180907/f1908a88/attachment-0001.html>


More information about the Scons-users mailing list