Re: Testing ninja build generator

Bill Deegan <[email protected]> Fri, 6 Jun 2025 11:26:28 -0700
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CAEyG4CFazPZvuNMSDqDy9QCE7wbTTXNVyUEJuL7145Fi8Ku2dw@mail.gmail.com>
--===============7351622691161525444==
Content-Type: multipart/alternative; boundary="00000000000011844e0636eb5f9b"

--00000000000011844e0636eb5f9b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

There is some generic filename escaping logic in scons which should likely
be used there.

env['ESCAPE'] should have the current platform's escaping function.

On Fri, Jun 6, 2025 at 9:55=E2=80=AFAM Mats Wichmann <[email protected]> wro=
te:

> On 6/6/25 10:42, Julien Pommier wrote:
> >
> >
> >> There's another layer of "quoting problem" here, beyond the URL-quotin=
g
> that I'm trying to understand.
> >>
> >> As written, the rule in build.ninja looks like:
> >>
> >> build run$ me.sh: TEMPLATE | .ninja/scons_daemon_dirty
> >>
> >> I'm assuming the '$' is some kind of space-escape syntax for ninja.
> This fails with
> >>
> >> scons: *** Do not know how to make File target `run'
> >>
> >> so we ended up seeing the target back in SCons as being just "run".
> Adding a layer of quotes doesn't work, as those are carefully preserved a=
nd
> the target names don't match.
> >>
> >> Not familiar with this code beyond the fiddling I did in Utils.py,
> hopefully someone else has some ideas, else we'll have to dig into it.
> >
> > It seems the quoting need to be applied to the line 234 in
> ninja_scons_daemon.py. Using:
> >
> >                      input_command =3D "build \"" + building_node + "\"=
\n"
> >
> > instead of
> >                     input_command =3D "build " + building_node + "\n"
> >
> > makes it work for my test-case
>
> yeah, that looks good.
>
>
> _______________________________________________
> Scons-users mailing list
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>

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

<div dir=3D"ltr"><div>There is some generic filename escaping logic in scon=
s which should=C2=A0likely be used there.</div><div><br></div><div>env[&#39=
;ESCAPE&#39;] should have the current platform&#39;s escaping function.</di=
v></div><br><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"lt=
r" class=3D"gmail_attr">On Fri, Jun 6, 2025 at 9:55=E2=80=AFAM Mats Wichman=
n &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<b=
r></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 6/6/25 10:42, =
Julien Pommier wrote:<br>
&gt; <br>
&gt; <br>
&gt;&gt; There&#39;s another layer of &quot;quoting problem&quot; here, bey=
ond the URL-quoting that I&#39;m trying to understand.<br>
&gt;&gt;<br>
&gt;&gt; As written, the rule in build.ninja looks like:<br>
&gt;&gt;<br>
&gt;&gt; build run$ me.sh: TEMPLATE | .ninja/scons_daemon_dirty<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m assuming the &#39;$&#39; is some kind of space-escape synt=
ax for ninja. This fails with<br>
&gt;&gt;<br>
&gt;&gt; scons: *** Do not know how to make File target `run&#39;<br>
&gt;&gt;<br>
&gt;&gt; so we ended up seeing the target back in SCons as being just &quot=
;run&quot;. Adding a layer of quotes doesn&#39;t work, as those are careful=
ly preserved and the target names don&#39;t match.<br>
&gt;&gt;<br>
&gt;&gt; Not familiar with this code beyond the fiddling I did in Utils.py,=
 hopefully someone else has some ideas, else we&#39;ll have to dig into it.=
<br>
&gt; <br>
&gt; It seems the quoting need to be applied to the line 234 in ninja_scons=
_daemon.py. Using:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 input_command =3D &quot;build \&quot;&quot; + building_node + &quot;=
\&quot;\n&quot;<br>
&gt; <br>
&gt; instead of<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0input_command =3D &quot;build &quot; + building_node + &quot;\n&quot;=
<br>
&gt; <br>
&gt; makes it work for my test-case<br>
<br>
yeah, that looks good.<br>
<br>
<br>
_______________________________________________<br>
Scons-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Scons-users@scon=
s.org</a><br>
<a href=3D"https://pairlist4.pair.net/mailman/listinfo/scons-users" rel=3D"=
noreferrer" target=3D"_blank">https://pairlist4.pair.net/mailman/listinfo/s=
cons-users</a><br>
</blockquote></div>

--00000000000011844e0636eb5f9b--

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

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

--===============7351622691161525444==--