-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dependency graph: deprecate the continuation backslash? #1328
Comments
@matthewrmshin - I agree that line continuation markers are not really necessary in graph strings, but the line-continuation is done early in the parsing process (in I have limited sympathy for users who leave whitespace after a line continuation marker - that sort of behaviour will bite them in their scripting etc. too. By the way, in the graph we don't strictly need line continuation or your still-inside-a-statement check (although I agree that would be nice) as already you can just do this:
|
I think parsec actually has some special logic for handling dependency graphs because the continuation marker is removed by the time the graph is processed by I don't have a lot of sympathy for the trailing white spaces problem, but then again we are dealing with real users here, so anything to help them is good. A better Jinja2 example would be one where the first line is full of |
I take it back. It looks like the continuation marker is removed from However, it appears that we already have some special logic to merge graphs under |
Sure, if the cost/benefit analysis works out in favour :-) In this case it might be easy enough, but I'm just pointing out that currently line joining is done globally, before we know anything about the meaning of the lines involved.
Yes - see #542. This was one of the reasons for replacing ConfigObj. |
I am in favour of updating the graph parsing engine, and not requiring the backslash. I don't think it is worth deprecating (then removing support for) the backslash on any |
I'm not sure the cost/benefit works out because:
I do think we should support syntax-driven line continuation in the graph, as you've suggested, which would make backslashes doubly unnecessary (in the graph string) but doesn't preclude allowing them as well for the three reasons just above. Ah... I just re-read Ben's comment and I think he's saying the same thing as me (?at least on "any reasonable timescale" he is). |
[meeting]
|
Background:
Is the backslash actually necessary? Continuation should be obvious from the graph syntax. If an identifier is followed by a
=>
,&
or|
operator, then it is still in the same statement. If an identifier is followed by another identifier, the second identifier is the beginning of a new statement. E.g.: it should be obvious that the following are equivalent:The Jinja2 example can be simplified somewhat:
Comments?
The text was updated successfully, but these errors were encountered: