From e33c4487836ee17f58b0a1ea3a4cce5219334f63 Mon Sep 17 00:00:00 2001 From: Felix Krause Date: Fri, 22 Oct 2021 18:36:29 +0200 Subject: [PATCH] up Readme, +funding, v0.16.0 --- .github/FUNDING.yml | 1 + CHANGELOG.md | 11 +++++++++++ README.md | 9 +++++++-- yaml.nimble | 4 ++-- yaml/serialization.nim | 7 ------- 5 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..a6579c1 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: flyx \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aa6a51..20d8d6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## 0.16.0 + +Features: + + * dumping ``sparse`` objects now omits empty ``Option`` fields (#100). + +Bugfixes: + + * Fixed several parser errors that emerged from updates on the test suite. + * Fixed ``raises`` annotations which could lead to compilation errors (#99). + ## 0.15.0 Features: diff --git a/README.md b/README.md index 186b5ae..43204dc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # NimYAML - YAML implementation for Nim -[![Build Status](https://travis-ci.org/flyx/NimYAML.svg?branch=devel)](https://travis-ci.org/flyx/NimYAML) +![Test Status](https://github.com/flyx/NimYAML/actions/workflows/action.yml/badge.svg) NimYAML is a pure Nim YAML implementation without any dependencies other than Nim's standard library. It enables you to serialize Nim objects to a YAML stream @@ -15,7 +15,8 @@ available as tags in this repository and can be fetched via nimble: ## Status -The library is fairly stable, I only maintain it and will not add any features due to lack of time and interest. There are few issues with YAML corner cases in the lexer which you are unlikely to encounter unless you're going for them. Fixing them would mean a larger refactor of the lexer which I am not willing to do. +The library is fairly stable, I only maintain it and will not add any features due to lack of time and interest. NimYAML passes all tests of the current YAML +test suite which makes it 100% conformant with YAML 1.2. PRs for bugs are welcome. If you want to add a feature, you are free to; but be aware that I will not maintain it and am unlikely to review it in depth, so if I accept it, you will be co-maintainer. @@ -51,5 +52,9 @@ When debugging crashes in this library, use the `d:debug` compile flag to enable [MIT][2] +## Support this Project + +If you like this project and want to give something back, you can check out GitHub's Sponsor button to the right. This is just an option I provide, not something I request you to do, and I will never nag about it. + [1]: http://flyx.github.io/NimYAML/ [2]: copying.txt diff --git a/yaml.nimble b/yaml.nimble index f62b1fd..d123545 100644 --- a/yaml.nimble +++ b/yaml.nimble @@ -1,6 +1,6 @@ # Package -version = "0.15.0" +version = "0.16.0" author = "Felix Krause" description = "YAML 1.2 implementation for Nim" license = "MIT" @@ -8,4 +8,4 @@ skipDirs = @["bench", "doc", "server", "test", "tools"] # Dependencies -requires "nim >= 1.0.0" +requires "nim >= 1.4.0" diff --git a/yaml/serialization.nim b/yaml/serialization.nim index d9b9d88..0a75412 100644 --- a/yaml/serialization.nim +++ b/yaml/serialization.nim @@ -627,13 +627,6 @@ proc checkDuplicate(s: NimNode, tName: string, name: string, i: int, newLit("While constructing " & tName & ": Duplicate field: " & escape(name)))))) -proc addDefaultOr(tName: string, i: int, o: NimNode, - field, elseBranch: NimNode): NimNode {.compileTime.} = - result = quote do: - when `o`.`field`.hasCustomPragma(defaultVal): - `o`.`field` = `o`.`field`.getCustomPragmaVal(defaultVal) - else: `elseBranch` - proc hasSparse(t: typedesc): bool {.compileTime.} = when compiles(t.hasCustomPragma(sparse)): return t.hasCustomPragma(sparse)