From 9791c755dda975d807ae1e0324fc3380373cd227 Mon Sep 17 00:00:00 2001 From: Michael Watzko Date: Mon, 22 Mar 2021 14:25:40 +0100 Subject: [PATCH] Update CHANGELOG and Cargo.toml for v0.2.1 release --- CHANGELOG.md | 22 ++++++++++++++++++++++ Cargo.toml | 8 ++++---- asn1rs-macros/Cargo.toml | 6 +++--- asn1rs-model/Cargo.toml | 2 +- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3da033db..7229302f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +# Version 0.2.1 (2021-03-22) + +This release refactors `Model` which is now represented as `Model>` and `Model>`. +This change allows Value-References in SIZE and RANGE constraints (see [gh-50](https://github.com/kellerkindt/asn1rs/issues/50) [gh-49](https://github.com/kellerkindt/asn1rs/issues/49)) without a failable `to_rust()` converter. + +### Fixes +- No longer choke on empty `SEQUENCE` definitions (see [gh-44](https://github.com/kellerkindt/asn1rs/issues/44)) + +### Added +- Parsing and resolving Value-References in SIZE and RANGE constraints (see [gh-50](https://github.com/kellerkindt/asn1rs/issues/50) [gh-49](https://github.com/kellerkindt/asn1rs/issues/49)) + +### Changes +- **BREAKING**: `Model::try_from(Tokenizer)` now returns `Model>`. To convert to rust (`Model::>::to_rust(&self) -> Model`) the fallible function `Model::>::try_resolve(&self) -> Model>` must be called first. + +```rust +let model_rust = Model::try_from(asn_tokens) + .expect("Failed to parse tokens") + .try_resolve() <--------------+--- new + .expect("Failed to resolve at least one value reference") <---+ + .to_rust(); +``` + # Version 0.2.0 (2021-02-03) This release includes a lot of refactoring and new features. diff --git a/Cargo.toml b/Cargo.toml index d4f2ff90..1ce9b6c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asn1rs" -version = "0.2.0" +version = "0.2.1" authors = ["Michael Watzko "] edition = "2018" description = "ASN.1 to Rust, Protobuf and SQL compiler/code generator. Supports ASN.1 UPER" @@ -44,8 +44,8 @@ futures = { version = "0.3.4", optional = true } bytes = { version = "0.5.4", optional = true } # feature asn1rs-* -asn1rs-model = { version = "0.2.0", path = "asn1rs-model", optional = true } -asn1rs-macros = { version = "0.2.0", path = "asn1rs-macros", optional = true } +asn1rs-model = { version = "0.2.1", path = "asn1rs-model", optional = true } +asn1rs-macros = { version = "0.2.1", path = "asn1rs-macros", optional = true } [dev-dependencies] syn = {version = "1.0.28", features = ["full", "visit"] } @@ -70,4 +70,4 @@ path = "benches/bitbuffer.rs" required-features = ["legacy_bit_buffer"] [package.metadata.docs.rs] -all-features = true \ No newline at end of file +all-features = true diff --git a/asn1rs-macros/Cargo.toml b/asn1rs-macros/Cargo.toml index 802e6f5d..410e83ec 100644 --- a/asn1rs-macros/Cargo.toml +++ b/asn1rs-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asn1rs-macros" -version = "0.2.0" +version = "0.2.1" authors = ["Michael Watzko "] edition = "2018" description = "Macros for asn1rs" @@ -20,6 +20,6 @@ debug-proc-macro = [] [dependencies] -asn1rs-model = { version = "0.2.0", path = "../asn1rs-model" } +asn1rs-model = { version = "0.2.1", path = "../asn1rs-model" } syn = {version = "1.0.17", features = ["full"] } -quote = "1.0.3" \ No newline at end of file +quote = "1.0.3" diff --git a/asn1rs-model/Cargo.toml b/asn1rs-model/Cargo.toml index 459e20d7..f3965ded 100644 --- a/asn1rs-model/Cargo.toml +++ b/asn1rs-model/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asn1rs-model" -version = "0.2.0" +version = "0.2.1" authors = ["Michael Watzko "] edition = "2018" description = "Rust, Protobuf and SQL model definitions for asn1rs"