You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Robot Framework data typically uses the whitespace-separated format that looks like this:
*** Test Cases ***Example
Keyword arg1 arg2
In addition to that, we support also the pipe-separated format like:
| *** Test Cases *** |
| Example |
| | Keyword | arg1 | arg2 |
Both of these formats have been supported equally long, since RF 2.1.1 (#375), and they can also be mixed withing a single file because the format is determined based on does a line start with a | or not. In practice the latter syntax is very rarely used and I don't even remember when I have seen it used anywhere except in our tests that validate that the syntax works.
My proposal is to remove the support for the pipe-separated format in order to make the syntax simpler. The main motivation is making it easier to implement new parsers for Robot Framework. It would help making external parsers, for example, for syntax highlighting purposes and it would also make it a lot easier to create a faster parser for Robot itself using C, Rust or Go. The motivation behind #5198 is exactly the same and that issue explains this situation in more detail.
Although this syntax is rarely used, I'm certain it's used somewhere and removing the syntax is obviously backwards incompatible. We thus need to deprecate it first.
If I remove the pipes, I no longer have to keep reminding some of my customers that it's a good idea to introduce a common (coding) style and use the same tools ...
A few additional considerations:
RobotCode supports the pipe format mostly because it uses the internal RF parser. However, there are special cases I haven't looked into yet because the pipe format is so rarely used and it complicates the code. Especially for things like quick fixes, refactorings, etc., I would theoretically always have to implement or consider two variants—one with spaces and one with pipes—which significantly increases the complexity and effort.
robotframework-tidy automatically converts the pipe format into the space format by default. This can probably be disabled somehow, but since not all transformers support the pipe format, it doesn't make much sense to keep it.
Removing the pipe format would make the code simpler and more consistent for everyone, So yes remove it! ;-)
We discussed this topic along with some other possible syntax changes in the RF 7.2 planning session today. The general consensus was that the pipe-separated syntax is very little used and supporting it adds extra work to Robot Framework and to tooling ecosystem. In addition to problems discussed above, it was mentioned that the pipe-separated syntax makes it harder to evolve Robot's "normal" syntax further. For example, we could support Cucumber-like data tables if pipes weren't used for the pipe-separated format.
Based on the discussion we decided to deprecate the pipe-separate syntax in RF 7.2 and I'll submit a separate issue about that. If there are lot of complaints about that, we can then look at the decision again. If there aren't complaints, we can then later remove the support, but I believe RF 8.0 is too early for that.
We had a question related to this in the community survey, but the survey obviously doesn't reach everyone. To make sure those using the pipe separated format will learn about the plans to remove it, we decided to deprecated the format in RF 7.2 (#5203). If there are lot of people using the format, we can still consider the removal decision.
The main two problems I see with keeping the support for the pipe separated format are the following:
It makes creating new Robot parsers harder. New parsers could be needed, for example, to speed up Robot's normal parser using e.g. Rust.
Tools like IDE plugins and formatters don't support it properly. Supporting pipes would be extra work for thr tool maintainers and with so few users that's likely not worth the effort.
The first problem could actually be solved by handling lines starting with | like this:
This approach is so simple that any new parser could use it. A drawback would be that the parsing model wouldn't directly match what's on disk and tools using it couldn't support pipes even if they wanted to. It would make it possible ro continue using pipes, though.
Activity
d-biehl commentedon Sep 9, 2024
Here are my 2 cents,
If I remove the pipes, I no longer have to keep reminding some of my customers that it's a good idea to introduce a common (coding) style and use the same tools ...
A few additional considerations:
RobotCode supports the pipe format mostly because it uses the internal RF parser. However, there are special cases I haven't looked into yet because the pipe format is so rarely used and it complicates the code. Especially for things like quick fixes, refactorings, etc., I would theoretically always have to implement or consider two variants—one with spaces and one with pipes—which significantly increases the complexity and effort.
robotframework-tidy automatically converts the pipe format into the space format by default. This can probably be disabled somehow, but since not all transformers support the pipe format, it doesn't make much sense to keep it.
Removing the pipe format would make the code simpler and more consistent for everyone, So yes remove it! ;-)
pekkaklarck commentedon Sep 9, 2024
We discussed this topic along with some other possible syntax changes in the RF 7.2 planning session today. The general consensus was that the pipe-separated syntax is very little used and supporting it adds extra work to Robot Framework and to tooling ecosystem. In addition to problems discussed above, it was mentioned that the pipe-separated syntax makes it harder to evolve Robot's "normal" syntax further. For example, we could support Cucumber-like data tables if pipes weren't used for the pipe-separated format.
Based on the discussion we decided to deprecate the pipe-separate syntax in RF 7.2 and I'll submit a separate issue about that. If there are lot of complaints about that, we can then look at the decision again. If there aren't complaints, we can then later remove the support, but I believe RF 8.0 is too early for that.
nefethael commentedon Nov 19, 2024
Was there any poll to assert this, or is it more like a feeling?
We use pipe format and for my point of view, this syntax is much clearer than just spaces, which can be confusing and error-prone.
Best regards,
Vincent
pekkaklarck commentedon Nov 20, 2024
We had a question related to this in the community survey, but the survey obviously doesn't reach everyone. To make sure those using the pipe separated format will learn about the plans to remove it, we decided to deprecated the format in RF 7.2 (#5203). If there are lot of people using the format, we can still consider the removal decision.
pekkaklarck commentedon Nov 20, 2024
The main two problems I see with keeping the support for the pipe separated format are the following:
The first problem could actually be solved by handling lines starting with
|like this:This approach is so simple that any new parser could use it. A drawback would be that the parsing model wouldn't directly match what's on disk and tools using it couldn't support pipes even if they wanted to. It would make it possible ro continue using pipes, though.
Snooz82 commentedon Nov 20, 2024
maybe add a custom parser that continues to support Pipes.
I will explain later a bit more...