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

add comment stripping from config file (issue #332) #529

Closed
wants to merge 1 commit into from
Closed

add comment stripping from config file (issue #332) #529

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented May 29, 2017

Comments will now be stripped while parsing config file.

@RonnyPfannschmidt
Copy link

it may be sensible to upstream this into https://github.com/RonnyPfannschmidt/iniconfig as well (i plan to de-vendor it from pylib)

@ghost
Copy link
Author

ghost commented Jun 6, 2017

@RonnyPfannschmidt Hello, what exactly would you want me to do?

@obestwalter
Copy link
Member

I don't get around reviewing and testing this, as I have a lot of other things on my plate. I just skimmed the changes and do not have a good feeling, when I see all the regexes :) - so any takers?

@hpk42
Copy link

hpk42 commented Jul 12, 2017

@sifuraz could you simplify the regexes or get rid of them if you just implement "comment stripping works by removing "#" and things right of it if that "#" sign is preceded by whitespace or a line beginning. This way URLs with hashparts would still work. if i see your tests i think the suggested "comment stripping" rule would already work. And it should be part of the docs.

@vlaci
Copy link

vlaci commented Jul 15, 2017

I have some concerns regarding this proposal:

  1. supporting comments inside a value specification would make tox.ini no longer an ini file.
  2. supporting # as a comment indicator while still supporting it as well inside values (e.g. in URLs) is confusing.
  3. could comment indicators be escaped? How would one specify a command line containing #s?

My 50 cents on the topic:

  • I would only support comments in their own separate lines with optional whitespace indentations in a value specification (inside a deps definition for example). I am seeing inline comment support more confusing than helpful in this case.
  • OR I'd use a more expressive configuration file format (e.g TOML)

@obestwalter obestwalter added the needs:discussion It's not quite clear if and how this should be done label Aug 11, 2017
@obestwalter
Copy link
Member

Thank you @sifuraz for your work, but I would propose to close this as wontfix. I have no trust that we can implement this reliably without causing maintenance nightmares down the road.

If you want to avoid work on PRs that might not get merged, make sure to open an issue first if there is none yet and discuss if this would be integrated (or start a discussion on tox-dev mailing list). In this case we even had an issue about this that was already marked as wontfix: #50

I rather like the idea of @vlaci - introducing another configuration file format in the future as I feel that we have driven the extension of the tox specific ini format quite far already (just had to suffer through that at the weekend fixing #595).

@obestwalter
Copy link
Member

P.S. created #600 to discuss that (one can dream, can't one?).

@obestwalter obestwalter closed this Sep 4, 2017
@obestwalter
Copy link
Member

@sifuraz I feel quite horrible about this, as I actually was the one who encouraged to pick that up, having completely forgotten about the closed dupe ... sorry again!

@ghost
Copy link
Author

ghost commented Sep 7, 2017

@obestwalter Don't worry about it 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:discussion It's not quite clear if and how this should be done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants