Skip to content

Commit eafa2b6

Browse files
authored
Merge pull request #472 from juntyr/v0.8.1
Bump ron to v0.8.1
2 parents 4089034 + 90fd484 commit eafa2b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1450
-472
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
rust: [1.56.0, stable, nightly]
21+
rust: [1.64.0, stable, nightly]
2222

2323
steps:
2424
- uses: actions/checkout@v3
@@ -84,7 +84,7 @@ jobs:
8484
profile: minimal
8585
components: llvm-tools-preview
8686
override: true
87-
- run: cargo install grcov --force --locked
87+
- run: cargo install grcov --force
8888
env:
8989
CARGO_TARGET_DIR: target/
9090
- run: |

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## [0.8.1] - 2023-08-17
10+
- Fix issues [#277](https://github.com/ron-rs/ron/issues/277) and [#405](https://github.com/ron-rs/ron/issues/405) with `Value::Map` `IntoIter` and extraneous item check for `Value::Seq` ([#406](https://github.com/ron-rs/ron/pull/406))
11+
- Fix issue [#401](https://github.com/ron-rs/ron/issues/401) with correct raw struct name identifier parsing ([#402](https://github.com/ron-rs/ron/pull/402))
12+
- Fix issue [#410](https://github.com/ron-rs/ron/issues/410) trailing comma parsing in tuples and `Some` ([#412](https://github.com/ron-rs/ron/pull/412))
13+
- Error instead of panic when deserializing non-identifiers as field names ([#415](https://github.com/ron-rs/ron/pull/415))
14+
- [Non-API] Breaking: Fix issue [#307](https://github.com/ron-rs/ron/issues/307) stack overflow with explicit recursion limits in serialising and deserialising ([#420](https://github.com/ron-rs/ron/pull/420))
15+
- Fix issue [#423](https://github.com/ron-rs/ron/issues/423) deserialising an identifier into a borrowed str ([#424](https://github.com/ron-rs/ron/pull/424))
16+
- Bump MSRV to 1.57.0 and bump dependency: `base64` to 0.20 ([#431](https://github.com/ron-rs/ron/pull/431))
17+
- Bump dependency `base64` to 0.21 ([#433](https://github.com/ron-rs/ron/pull/433))
18+
- Depend on `serde_derive` directly to potentially enable more compilation parallelism ([#441](https://github.com/ron-rs/ron/pull/441))
19+
- [Non-API] Breaking: Bump `bitflags` dependency to 2.0, changes `serde` impls of `Extensions` ([#443](https://github.com/ron-rs/ron/pull/443))
20+
- Add `Map::retain` method ([#460](https://github.com/ron-rs/ron/pull/460))
21+
- Bump MSRV to 1.64.0 and bump dependency: `indexmap` to 2.0 ([#459](https://github.com/ron-rs/ron/pull/459))
22+
923
## [0.8.0] - 2022-08-17
1024

1125
- Bump dependencies: `bitflags` to 1.3, `indexmap` to 1.9 ([#399](https://github.com/ron-rs/ron/pull/399))

Cargo.toml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "ron"
33
# Memo: update version in src/lib.rs too (doc link)
4-
version = "0.8.0"
4+
version = "0.8.1"
55
license = "MIT OR Apache-2.0"
66
keywords = ["parser", "serde", "serialization"]
77
authors = [
88
"Christopher Durham <cad97@cad97.com>",
99
"Dzmitry Malyshau <kvarkus@gmail.com>",
1010
"Thomas Schaller <torkleyy@gmail.com>",
11-
"Juniper Langenstein <juniper.langenstein@helsinki.fi>",
11+
"Juniper Tyree <juniper.tyree@helsinki.fi>",
1212
]
1313
edition = "2021"
1414
description = "Rusty Object Notation"
@@ -17,20 +17,22 @@ readme = "README.md"
1717
homepage = "https://github.com/ron-rs/ron"
1818
repository = "https://github.com/ron-rs/ron"
1919
documentation = "https://docs.rs/ron/"
20-
rust-version = "1.56.0"
20+
rust-version = "1.64.0"
2121

2222
[features]
2323
default = []
2424
integer128 = []
2525

2626
[dependencies]
27-
base64 = "0.13"
28-
bitflags = "1.3.2"
29-
indexmap = { version = "1.9.1", features = ["serde-1"], optional = true }
30-
serde = { version = "1.0.60", features = ["serde_derive"] }
27+
base64 = "0.21"
28+
bitflags = { version = "2.0", features = ["serde"] }
29+
indexmap = { version = "2.0", features = ["serde"], optional = true }
30+
# serde supports i128/u128 from 1.0.60 onwards
31+
serde = "1.0.60"
32+
serde_derive = "1.0"
3133

3234
[dev-dependencies]
35+
serde = { version = "1.0", features = ["derive"] }
3336
serde_bytes = "0.11"
34-
serde_json = "1"
35-
bitflags-serial = { git = "https://github.com/kvark/bitflags-serial" }
36-
option_set = "0.1"
37+
serde_json = "1.0"
38+
option_set = "0.2"

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![CI](https://github.com/ron-rs/ron/actions/workflows/ci.yaml/badge.svg)](https://github.com/ron-rs/ron/actions/workflows/ci.yaml)
44
[![codecov](https://img.shields.io/codecov/c/github/ron-rs/ron/codecov?token=x4Q5KA51Ul)](https://codecov.io/gh/ron-rs/ron)
55
[![Crates.io](https://img.shields.io/crates/v/ron.svg)](https://crates.io/crates/ron)
6-
[![MSRV](https://img.shields.io/badge/MSRV-1.56.0-orange)](https://github.com/ron-rs/ron)
6+
[![MSRV](https://img.shields.io/badge/MSRV-1.64.0-orange)](https://github.com/ron-rs/ron)
77
[![Docs](https://docs.rs/ron/badge.svg)](https://docs.rs/ron)
88
[![Matrix](https://img.shields.io/matrix/ron-rs:matrix.org.svg)](https://matrix.to/#/#ron-rs:matrix.org)
99

@@ -18,23 +18,23 @@ GameConfig( // optional struct name
1818
window_size: (800, 600),
1919
window_title: "PAC-MAN",
2020
fullscreen: false,
21-
21+
2222
mouse_sensitivity: 1.4,
2323
key_bindings: {
2424
"up": Up,
2525
"down": Down,
2626
"left": Left,
2727
"right": Right,
28-
28+
2929
// Uncomment to enable WASD controls
3030
/*
3131
"W": Up,
32-
"A": Down,
33-
"S": Left,
32+
"S": Down,
33+
"A": Left,
3434
"D": Right,
3535
*/
3636
},
37-
37+
3838
difficulty_options: (
3939
start_difficulty: Easy,
4040
adaptive: false,
@@ -102,6 +102,13 @@ Note the following advantages of RON over JSON:
102102
* optional struct names improve readability
103103
* enums are supported (and less verbose than their JSON representation)
104104

105+
## Limitations
106+
107+
RON is not designed to be a fully self-describing format (unlike JSON) and is thus not guaranteed to work when [`deserialize_any`](https://docs.rs/serde/latest/serde/trait.Deserializer.html#tymethod.deserialize_any) is used instead of its typed alternatives. In particular, the following Serde attributes are not yet supported:
108+
- `#[serde(tag = "type")]`, i.e. internally tagged enums
109+
- `#[serde(untagged)]`, i.e. untagged enums
110+
- `#[serde(flatten)]`, i.e. flattening an inner struct into its outer container
111+
105112
## RON syntax overview
106113

107114
* Numbers: `42`, `3.14`, `0xFF`, `0b0110`
@@ -139,8 +146,12 @@ struct MyStruct {
139146

140147
fn main() {
141148
let x: MyStruct = ron::from_str("(boolean: true, float: 1.23)").unwrap();
142-
149+
143150
println!("RON: {}", ron::to_string(&x).unwrap());
151+
152+
println!("Pretty RON: {}", ron::ser::to_string_pretty(
153+
&x, ron::ser::PrettyConfig::default()).unwrap(),
154+
);
144155
}
145156
```
146157

clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
msrv = "1.56.0"
1+
msrv = "1.64.0"
22
blacklisted-names = []

docs/grammar.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ RON = [extensions], ws, value, ws;
1818
```ebnf
1919
ws = { ws_single | comment };
2020
ws_single = "\n" | "\t" | "\r" | " ";
21-
comment = ["//", { no_newline }, "\n"] | ["/*", { ? any character ? }, "*/"];
21+
comment = ["//", { no_newline }, "\n"] | ["/*", nested_block_comment, "*/"];
22+
nested_block_comment = { ? any characters except "/*" or "*/" ? }, [ "/*", nested_block_comment, "*/", nested_block_comment ];
2223
```
2324

2425
## Commas
@@ -138,3 +139,14 @@ enum_variant_unit = ident;
138139
enum_variant_tuple = ident, ws, tuple;
139140
enum_variant_named = ident, ws, "(", [named_field, { comma, named_field }, [comma]], ")";
140141
```
142+
143+
## Identifier
144+
145+
```ebnf
146+
ident = ident_std | ident_raw;
147+
ident_std = ident_std_first, { ident_std_rest };
148+
ident_std_first = "A" | ... | "Z" | "a" | ... | "z" | "_";
149+
ident_std_rest = ident_std_first | digit;
150+
ident_raw = "r", "#", ident_raw_rest, { ident_raw_rest };
151+
ident_raw_rest = ident_std_rest | "." | "+" | "-";
152+
```

examples/decode.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#![allow(dead_code)]
22

3+
use std::collections::HashMap;
4+
35
use ron::de::from_str;
46
use serde::Deserialize;
5-
use std::collections::HashMap;
67

78
#[derive(Debug, Deserialize)]
89
struct Config {

examples/decode_file.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#![allow(dead_code)]
22

3+
use std::{collections::HashMap, fs::File};
4+
35
use ron::de::from_reader;
46
use serde::Deserialize;
5-
use std::{collections::HashMap, fs::File};
67

78
#[derive(Debug, Deserialize)]
89
struct Config {

examples/encode.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
use std::{collections::HashMap, iter::FromIterator};
2+
13
use ron::ser::{to_string_pretty, PrettyConfig};
24
use serde::Serialize;
3-
use std::{collections::HashMap, iter::FromIterator};
45

56
#[derive(Serialize)]
67
struct Config {

fuzz/.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
2-
target
3-
corpus
4-
artifacts
1+
/artifacts
2+
/corpus
3+
/target
4+
/Cargo.lock

0 commit comments

Comments
 (0)