cqfd: do not handle semicolon comments#141
cqfd: do not handle semicolon comments#141gportay wants to merge 1 commit intosavoirfairelinux:masterfrom
Conversation
78c667b to
f440a55
Compare
|
So there is no way to add comments to a cqfdrc file ? And this breaks if someone has a comment in one of his cqfd file ? We may bump major version after that |
There is a way to add comments... since the .ini file is transformed into shell, the shell comment (i.e. starting after a The
Yes, if someone use the The Add stops working if that PR is applied: Important: The worse thing with the parse is you cannot comment in the first file of the file cqfdrc, because of that. Comment can be added everywhere, including the last line. |
I guess your are right, it is preferable to bump to cqfd 6; and maybe we can apply more breaking changes at the same time. And we should also post a note in the README.md file. I am thinking about deprecating the command run in favor of So if we go to depreciate
In short, This is an idea I have in mind. But that is not the right place to talk about that. It is better to file an issue if this is something that should be considered. This sounds to need a plan for merging the different PRs to prepare a 5.7.0 (i.e. probably all the PRs up to 150, excluding that one about the comment). And then applies that one and rework the first commit of #106 for cqfd 6. |
0eb149f to
d5e9a7f
Compare
|
do we start to merge those breaking changes? |
|
I wonder if we should tag a 5.7 and wait for the 6.0. |
|
Ok like a 5.7 until podman support, and then we merge the breaking changes ? |
|
Yes indeed. Also, I would like to add warnings for upcoming changes in 6.0. I think about the deprecating the command Also, about the |
|
I just came across an old project containing semicolon comments in the .cqfdrc ^^ |
Switch them to shell comments :) |
|
Also, I think we can introduce an environment such as + if [ "${CQFD_COMPAT:-57}" -le 56 ]; then
ini=( ${ini[*]//;*/} ) # remove comments with ;
+ fi |
|
or would it be possible to detect if the semicolon is the first char of a line and put a warning to tell to switch to |
a391708 to
08e5447
Compare
The .ini files uses the semicolon for comments. Also, that exact same character is one of the shell control operator for list of pipelines. The hacky parser is not smart enough to make the distinction if a semicolon is an .ini comment or if it is a shell control operator. It considers every semicolon character as a .ini comment, and it removes the remaining characters till the EOL (including the semicolon), even if they are part of a list of pipeline. As a consequence, it cuts off the list of pipelines if the command= values contain a semicolon character, and it results in running the left-hand only. This stops to handle the semicolon comments to avoid amputating the list of pipelines controled by semicolons that are set in values of the command= properties. Note: The parser converts the .ini file to bash; as a consequence, the shell comments do not affect the parsing, as long as the hashmark does not break the syntax **AND** if it not put at the end of the section line.
08e5447 to
030f2c7
Compare
The .ini files uses the semicolon for comments. Also, that exact same character is one of the shell control operator for list of pipelines.
The hacky parser is not smart enough to make the distinction if a semicolon is an .ini comment or a shell control operator.
It considers any semicolon character as a .ini comment, and it removes the remaining characters till the EOL (including the semicolon), even if they are part of a list of pipeline.
As a consequence, it cuts off the list of pipelines if the command= values contain a semicolon character, and it results in running the left-hand only.
This stops to handle the semicolon comments to avoid amputating the list of pipelines controled by semicolons that are set in values of the command= properties.
Note: The parser converts the .ini file to bash; as a consequence, the shell comments do not affect the parsing, as long as the hashmark does not break the syntax AND if it not put at the end of the section line.