Skip to content
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

inifiles with trailing comments are broken #144

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

timurb
Copy link

@timurb timurb commented Jul 21, 2014

This is a pullrequest with failing tests but not with functionality fix.

In version 0.10 empty comments after values in inifiles worked fine.
After the upgrade the augeas started to crash with the following error on these:

$  augparse test_inifile.aug                                                                                          * master 1c89f56
test_inifile.aug:47.2-58.7:exception thrown in test
test_inifile.aug:47.7-.27:exception: Get did not match entire input
    Lens: /usr/share/augeas/lenses/dist/inifile.aug:497.25-.43:
    Error encountered at 8:0 (135 characters into string)
    <paces"\n; comment with colon\n|=|test_ace = value_with_traili>

    Tree generated so far:
    /#comment = "comment with sharp"
/(none)
/section1
/section1/test_ace[1] = "value"
/section1/test_ace[1]/#comment = "end of line comment"
/section1/test_ace[2]
/section1/test_ace[3] = "value with spaces"
/section1/#comment = "comment with colon"


Syntax error in lens definition
Failed to load test_inifile.aug

I'm using augeas-tools, augeas-lenses and libaugeas0 1.2.0-0ubuntu1 from Ubuntu 14.04

I'd happy to create not only a test for that but also a fix but atm I can't quite understand how to debug this into getting it fixed.

@timurb
Copy link
Author

timurb commented Jul 21, 2014

The similar issue was observed before and fixed with:
5b289aa

After 49a2670 it has broken again.

@raphink
Copy link
Member

raphink commented Oct 22, 2014

End-of-line comments do work, but empty comments are not considered as comments.

@raphink
Copy link
Member

raphink commented Oct 22, 2014

One option could be to use empty instead of eol at the end of entries.

@raphink
Copy link
Member

raphink commented Jun 12, 2015

@timurb ping?

@timurb
Copy link
Author

timurb commented Jun 12, 2015

@raphink Sorry, are you waiting for some input from me?
This pull request is only failing tests. I could not fix this right away so I submitted only tests.

@raphink
Copy link
Member

raphink commented Jun 12, 2015

Sorry, my bad, I reviewed the PR a bit too fast ;-)

@raphink raphink added the bug label Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants