options to preserve and return yml comments.

#15 Declined
Repository
mepeisen
Branch
default
Repository
asomov
Branch
default
Author
  1. Martin Martin
Reviewers
Description

This patch contains options to not skip yaml comments. If Yaml.setSkipComments(false) is called before reading a document the comments are parsed and returned. One can override Constructor and fetch them from Node them into custom objects.

Comments (10)

  1. Andrey Somov repo owner

    Dear Martin, this is a very big change. Not only it explicitly violates the specification, it also raises many questions. - is there a commitment from you to answer community questions, fix issues and maintain the change ? - can you create a manual/tutorial/description which will be included into the documentation ? - if you consider this change incomplete, what are the steps to make it complete ? - would you like to share your proposal in the general yaml-core mailing list ?

    Cheers, Andrey

  2. Martin Martin author

    I am not interested in having and updating a fork to fit "my needs". Actually I have a feature request to put some comments into the yaml files for administrators to see what they are editing in text editors. And as I do not want to remove comments the user created for itself I looked for a fast way to access the comments during parsing without writing my own parser.

    As CommentToken already was within snakeyml but seemed to not be in use yet, it seemed to be clever simply using it and patching.

    Hmmm.

    Let me suggest the following: If you sahre a link to the mailing list and invite interested people in discussing it here I would be able to answer questions, complete the work etc. I am not familiar with the specification itself and there may be other users but I should be able to help. Anyhow possible bugs will be fixed because I am not interested in having a buggy yml implementation as part of my Software ;-)

  3. Martin Martin author

    I registered with Mailing list and posted. Hope that worked because I do not see my post on the web link. I will add more test cases at my fork. Some things did not work. Once my work is finished I will come back to you.

  4. Andrey Somov repo owner

    I do not see your post in the yaml-core mailing list.

    Please be aware that we need to evaluate and discuss your changes. If you expect the changes to be included in the February release you need to deliver as soon as possible.

  5. Andrey Somov repo owner

    I have seen the question in the mailing list. Great. Please be aware that SnakeYAML implements YAML 1.1, the implementation for spec 1.2 is under construction...

  6. Martin Martin author

    There is no need to hurry for me. I preferr a clean and acceptable solution instead of hurrying. Anyhow my fork will be part of my software in a relocated package because the main Software I am writing plugins already includes snakeyml in an older Version. I will increase number of test cases. What to do if no one answers on mailing list in the next weeks/months?

  7. Andrey Somov repo owner

    I expected that other SnakeYAML developers should also find time and look into this proposal. When we agree on big things we can discuss something smaller (For instance that "protected boolean skipComments = true" should not be part of Yaml but LoaderOptions.)