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

YAML Loader improvements #175

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

YAML Loader improvements #175

wants to merge 5 commits into from

Conversation

zml2008
Copy link
Member

@zml2008 zml2008 commented Oct 23, 2020

Rewrite the YAML loader to use SnakeYaml's lower-level API

Goals are to:

  • Be able to round-trip documents while preserving node and scalar style
  • Read and write comments to YAML documents
  • Integrate Tag handling with Configurate's type serializer system

@zml2008 zml2008 modified the milestones: 4.0, 4.1 Oct 23, 2020
@zml2008 zml2008 modified the milestones: 4.1, 4.2 May 3, 2021
@zml2008 zml2008 force-pushed the feature/yaml-improvements branch 3 times, most recently from fc79b90 to 9d43596 Compare December 19, 2021 01:52
@zml2008 zml2008 force-pushed the feature/yaml-improvements branch from 9d43596 to 1a57de0 Compare May 15, 2022 02:47
Djaytan added a commit to Djaytan/mc-jobs-reborn-patch-place-break that referenced this pull request Feb 12, 2023
The motivation to change the config format come from a limitation of Configurate about YAML format. It is not possible to serialize a YAML content with comments whereas this is a requirement for the project.
More details can be found here about Configurate and YAML module: SpongePowered/Configurate#175
Djaytan added a commit to Djaytan/mc-jobs-reborn-patch-place-break that referenced this pull request Feb 12, 2023
The motivation to change the config format come from a limitation of Configurate about YAML format. It is not possible to serialize a YAML content with comments whereas this is a requirement for the project.
More details can be found here about Configurate and YAML module: SpongePowered/Configurate#175
@zml2008 zml2008 modified the milestones: 4.2.0, 4.3.0 Jun 2, 2023
This allows us to capture more information as representation
hints and to precisely control the output.

We can also read comments events to properly round-trip comments in
configuration files
@zml2008 zml2008 mentioned this pull request Jan 11, 2024
@bloodmc
Copy link

bloodmc commented Jun 12, 2024

I am currently using your feature/yaml-improvements branch for my plugin and YAML is working great including comments.

@Reddishye
Copy link

@zml2008 any known information about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants