So now I'm just looking for buy-in/where to put tests.

On Mon, May 6, 2019 at 2:44 PM Garrick Peschke <[email protected]> wrote:

> Thanks! The relevant section is line 603 of that file. Do you know also
> where the relevant unit tests would be?
>
> As for pipe character- I'm not set on it specifically, I'm just looking
> for a visually non distracting character that should NEVER start a line.
> Thinking on it- "]" is probably slightly better.
>
> Finally, here(untested, uncompiled, without unittests) is what I'd put
> into a PR. (Using 'while' instead of 'for' for style consistency with the
> rest of the file), inserted after line 607
>
> if (line[0] == ']') {
>   /* Discard inline comments */
>   char * search = newline;
>   while(search > line) {
>      if (search[0] == '#')
>          newline = search;
>      search--;
>   }
>   *newline = 0;
> }
>
> On Tue, Apr 30, 2019 at 7:10 PM Erik Brinkman <[email protected]>
> wrote:
>
>> I can't speak for the actual maintainers, but I think the potential
>> reason it hasn't been added is that it's tricky to do it correctly, i.e. in
>> a backward compatible manner, that's clean and without feature bloat.
>>
>> In particular, you are listing one type of variable assignment in tup,
>> but there's also &-variables, and CONFIG_ variables, and maybe other things
>> that I'm missing. If you were to set a filename with a hashtag in it, i.e.
>> `&MY_FILE = #of_things.txt`, what should the behavior be? Should you have
>> to escape hashtags? Should they only be valid in the one type expression?
>> IMO the pipe is a weird way to signal inline commenting. A better way might
>> be to have a tup config option that signals inline comments for variables.
>>
>> It might be worth submitting an example PR with the way you see it
>> operating, but again, since I'm not a maintainer, this recommendation isn't
>> worth much.
>>
>> The place you want to look for variable parsing is here
>> <https://github.com/gittup/tup/blob/master/src/tup/parser.c#L1650>.
>>
>> Best of luck!
>>
>> On Sat, Apr 20, 2019 at 8:34 PM Garrick Peschke <[email protected]>
>> wrote:
>>
>>> I'm looking to make/post an example Arduino tupfile,
>>> and I want to make it super well documented for new folks,
>>> so that difference between it and crappy makefiles is VERY apparent.
>>>
>>> Unfortunately, this means over commenting. To this sort of level:
>>>   FLAGS += -g              # Include debug info
>>>   FLAGS += -Os           # Compile optimizing size
>>>   FLAGS += -Wall         # turn on compiler warnings
>>>
>>> Which works, cause it's neat and easy to visually scan.
>>> Unfortunately, tup doesn't support that (yet?)
>>>
>>> Instead, I'm forced into the following:
>>>   # Include debug info
>>>   FLAGS += -g
>>>
>>>   # Compile optimizing size
>>>   FLAGS += -Os
>>>
>>>   # turn on compiler warnings
>>>   FLAGS += -Wall
>>>
>>> Which is visually jarring, and would be offputting to new folks. Heck,
>>> it's offputting to me.
>>> I assume the lack has to do with either developer time, or minimizing
>>> escape characters.
>>>
>>> If it's escape characters, why don't we do something like:
>>> | FLAGS += -g              # Include debug info
>>> Where we start the line with | to explicitly turn on inline commenting.
>>>
>>> Is there a reason not to implement this/a way that I could get this
>>> implemented?
>>> I'm willing to code, if I have buyin/someone pointing me in the right
>>> direction.
>>>
>>> --
>>> --
>>> tup-users mailing list
>>> email: [email protected]
>>> unsubscribe: [email protected]
>>> options: http://groups.google.com/group/tup-users?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "tup-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> --
>> tup-users mailing list
>> email: [email protected]
>> unsubscribe: [email protected]
>> options: http://groups.google.com/group/tup-users?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "tup-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to