This PR replace snakeyaml with snakeyaml-engine in order to support YAML 1.2 Version 1.2 solves among others Norway problem https://hitchdev.com/strictyaml/why/implicit-typing-removed, mentioned in https://github.com/spring-projects/spring-boot/issues/17113
Please note that to mitigate the Norway problem, Spring Boot team decided to use apostrophe in every documentation snippet: https://github.com/spring-projects/spring-boot/issues/28709/. That decreases documenation readability.
The following page compares versions 1.1 and 1.2: https://yaml.readthedocs.io/en/latest/pyyaml.html
I drop off 'supportedTypes' support. The feature was added in https://github.com/spring-projects/spring-framework/issues/25152. I asked question for purpose, but I didn't get answer.
I decide to drop because: 1. Supported types are not directly provided by snakeyaml-engine 2. Clients - for example Spring Boot OriginTrackedYamlLoader - still may modify yaml setup and implement supported types 3. Supported types are not documented 4. I think that supported types is wrong idea. Parsing YAML should be simple, conversion should be implemented in application code.
Comment From: linghengqian
YAML 1.1 and YAML 1.2 are two different sets of specifications, which is why SnakeYAML separates the two components. Is there an issue to discuss such a big change in advance?
Comment From: michaldo
Main reason to change in ambigous conversion unquoted Yes, No, On, Off. I do not think the change is big. Contrary, I think the change will be transparent to almost all users.
Comment From: linghengqian
Overall, there are too many unit tests to fix – a change that completely destroys downstream use.
Comment From: michaldo
I see. I will fix failing test
wt., 7 cze 2022 o 04:59 Ling Hengqian @.***> napisał(a):
Overall, there are too many unit tests to fix – a change that completely destroys downstream use.
— Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-framework/pull/28349#issuecomment-1148138701, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABA223D4X55IAVBO53CJYSLVN23JNANCNFSM5TREAAVQ . You are receiving this because you authored the thread.Message ID: @.***>
Comment From: michaldo
@linghengqian I merged main branch to PR and failing tests disappeared
Comment From: linghengqian
CC @sbrannen
Comment From: asomov
@michaldo I tried to move to SnakeYAML Engine also, but I found a dependency with Spring Boot. I think it should be taken together.
Comment From: bclozel
Since there is no so much community demand for this, we're declining this PR for now; it's been declined in Spring Boot as well, see spring-projects/spring-boot#17113. The behavior changes are likely to break configuration of existing applications.
We could offer Yaml 1.2 as an alternate strategy in the future, but we don't feel like we should invest time in this right now. We might reconsider this decision in the future. Thanks!