[Scons-users] Prevent users from shooting them in the foot when adding FLAGS

Bill Deegan bill at baddogconsulting.com
Wed Nov 15 14:56:06 EST 2017


Likley CLVar in src/engine/SCons/Utils.py and also Environment.py.

Though as I said I'm working on a big rewrite.
Also a more generic way might be better.

Say being able to specify validators per Environment variable?

-Bill

On Wed, Nov 15, 2017 at 10:31 AM, Dan Čermák <dan.cermak at cgc-instruments.com
> wrote:

> Hi Bill,
>
> if you could point me to the code which handles environment variables
> I'll try to create a pull request.
>
>
> Cheers,
>
> Dan
>
> Bill Deegan <bill at baddogconsulting.com> writes:
>
> > Dan,
> >
> > That must've been fun to find.. ;)
> > Pull requests welcome.
> > Though I'm reworking the storage/evaluation of environment variables
> > currently which I plan to get into the 3.1 or 4.0 release (Next feature
> > release, naming depends on whether I need to break compatibility with
> > 3.0.1..)
> >
> > -Bill
> >
> > On Wed, Nov 15, 2017 at 7:15 AM, Dan Čermák <dan.cermak at cgc-instruments.
> com>
> > wrote:
> >
> >> Hi folks,
> >>
> >> I have today successfully shoot myself in the foot with SCons by
> >> effectively doing the following:
> >>
> >> env.Append(CPPPATH=['/path/to/foo/bar\n'])
> >>
> >> The issue with this is that any build command gets terminated by the \n
> >> prematurely, e.g. a gcc -I/path/to/foo/bar\n -c foo.c gets executed as:
> >> gcc -I/path/to/foo/bar
> >> which obviously fails, as gcc lacks any source files.
> >>
> >> This is of course a user error (in my case it was because I extracted
> >> the CPPPATH from the invocation of an external program), however would
> >> anything speak against printing a warning if a \n or \r\n appears in any
> >> of the variables passed to the Environment?
> >>
> >>
> >> Cheers,
> >>
> >> Dan
> >> _______________________________________________
> >> Scons-users mailing list
> >> Scons-users at scons.org
> >> https://pairlist4.pair.net/mailman/listinfo/scons-users
> >>
> > _______________________________________________
> > Scons-users mailing list
> > Scons-users at scons.org
> > https://pairlist4.pair.net/mailman/listinfo/scons-users
> _______________________________________________
> 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/20171115/ce796260/attachment.html>


More information about the Scons-users mailing list