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

Release 8.0.0 - Support Flow/JSON-Style Nodes #384

Closed
amihaiemil opened this issue Jul 14, 2020 · 8 comments
Closed

Release 8.0.0 - Support Flow/JSON-Style Nodes #384

amihaiemil opened this issue Jul 14, 2020 · 8 comments

Comments

@amihaiemil
Copy link
Member

amihaiemil commented Jul 14, 2020

This is a bigger release containing:

Support for reading flow-style nodes (both inline or multiline)! For example:

name: eo-yaml
developers: [amihaiemil, sherif, rultor]
tools: {
  pm: self-xdsd,
  devops: rultor,
  ci: actions
}
empty-map: {}
inline-map: {a: b:, c: d}
empty-seq: []
multiline-sequence: [
  a,
  b,
  c
]

ESCAPING LOGIC FIXES:

Fixes to escaping of strings when printing and reading escaped keys. Previously we would escape any string containing a dash (e.g. kafka-topic: test would be printed as "kafka-topic": test). Now, we only escape it if it starts with a dash (i.e. looks like a block scalar entry). We also do not escape strings containing $ anymore.

Fixes to escaping of scalars containing : - we now only escape the scalar if the value starts with : or if it contains : .* (colon followed by spaces and any characters, indicating a key: value pair.

Small backwards-compatibiliy break: Previously wrongly escaped strings may now be printed as not-escaped, as explained above.

@amihaiemil amihaiemil pinned this issue Jul 14, 2020
@amihaiemil amihaiemil changed the title Release 5.2.0 Release 6.0.0 Jul 16, 2020
@amihaiemil amihaiemil changed the title Release 6.0.0 Release 6.1.0 Oct 16, 2021
@rocket-3
Copy link
Contributor

@amihaiemil, why issue #368 is not present in the latest release?
Maybe there is some work to be done?
I need that feature and want to contribute, but can't figure out, what to do.

@amihaiemil
Copy link
Member Author

amihaiemil commented Nov 17, 2021

@rocket-3 that's a big feature which is not yet implemented and will require quite some architectural work before actually writing code. Unfortunately I am very busy these days.

You need building/printing or reading, or both?

@amihaiemil
Copy link
Member Author

@rocket-3 actually I see we already started working on this functionality.

I will have a look these days and let you know how we proceed :)

@amihaiemil
Copy link
Member Author

@rocket-3 I will also write a documentation about the architecture.

In principle, the idea of this library is that data is not transformed or mapped. The idea is to not map/transform data or objects, but rather to have different implementations for different scenarios. It's an experiment (which seems to be succesful so far), based on the books "Elegant Objects" and "Object Thinking".

We have for example the YamlMapping with 2 main implementations: BuiltYamlMapping which has a Map behind (this implementation is used when building) and ReadYamlMapping, which is implemented on top of YamlLines which are read from the file (the lines are traversed up and down, left and right, to find the keys and the values).

Now, ReadYamlMapping is actually for block mappings. For flow mappings we need ReadFlow YamlMapping.

@rocket-3
Copy link
Contributor

You need building/printing or reading, or both?

@amihaiemil Printing. Yeah, there's no actual problem reading Flow Mapping as Plain Scalar, ommiting "", but there's no way to skip "" on printing.

@amihaiemil amihaiemil changed the title Release 6.1.0 Release 6.2.0 Aug 27, 2022
@amihaiemil amihaiemil changed the title Release 6.2.0 Release 7.1.0 Nov 26, 2022
@amihaiemil amihaiemil changed the title Release 7.1.0 Release 7.2.0 Jan 19, 2024
@amihaiemil amihaiemil changed the title Release 7.2.0 Release 7.3.0 Jan 22, 2024
@amihaiemil amihaiemil changed the title Release 7.3.0 Release 8.0.0 Apr 13, 2024
@amihaiemil amihaiemil changed the title Release 8.0.0 Release 8.0.0 - Support Flow/JSON-Style Nodes Apr 13, 2024
@amihaiemil
Copy link
Member Author

@rultor release it please, tag is 8.0.0

@rultor
Copy link
Collaborator

rultor commented Apr 22, 2024

@rultor release it please, tag is 8.0.0

@amihaiemil OK, I will release it now. Please check the progress here

@rultor
Copy link
Collaborator

rultor commented Apr 22, 2024

@rultor release it please, tag is 8.0.0

@amihaiemil Done! FYI, the full log is here (took me 4min)

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

No branches or pull requests

3 participants