From 1f1ba51249df6f3ce739d4727e054d0893fd3288 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 5 Apr 2020 18:14:06 +0100 Subject: Doc tweaks --- README.md | 7 ++++++- serde_dhall/src/options.rs | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1520b7d..11acb5a 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,12 @@ same name as the corresponding test. #### [???] -- Breaking change: reworked most of the `serde_dhall` api +- Add `serde_dhall::from_file` to read a Dhall file directly. +- BREAKING CHANGE: reworked most of the `serde_dhall` API + + You need to replace uses of `from_str(s)` with `from_str(s).parse()`. The + various type annotation methods have been removed; use instead the methods on + the `Deserializer` struct. #### [0.4.0] diff --git a/serde_dhall/src/options.rs b/serde_dhall/src/options.rs index 06a4368..76b1c5b 100644 --- a/serde_dhall/src/options.rs +++ b/serde_dhall/src/options.rs @@ -302,6 +302,8 @@ impl<'a, A> Deserializer<'a, A> { /// This returns a [`Deserializer`] object. Call the [`parse`] method to get the deserialized /// value, or use other [`Deserializer`] methods to control the deserialization process. /// +/// Imports will be resolved relative to the current directory. +/// /// # Example /// /// ```rust @@ -338,6 +340,8 @@ pub fn from_str(s: &str) -> Deserializer<'_, NoAnnot> { /// This returns a [`Deserializer`] object. Call the [`parse`] method to get the deserialized /// value, or use other [`Deserializer`] methods to control the deserialization process. /// +/// Imports will be resolved relative to the provided file's path. +/// /// # Example /// /// ```no_run -- cgit v1.2.3 From 4108bc32e6d7919523c2102421967f23d43f87b2 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 5 Apr 2020 18:17:15 +0100 Subject: Setup cargo-release --- README.md | 5 ++++- abnf_to_pest/Cargo.toml | 3 ++- dhall/Cargo.toml | 3 ++- dhall_proc_macros/Cargo.toml | 3 ++- release.toml | 10 ++++++++++ serde_dhall/Cargo.toml | 3 ++- serde_dhall/release.toml | 29 +++++++++++++++++++++++++++++ 7 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 release.toml create mode 100644 serde_dhall/release.toml diff --git a/README.md b/README.md index 11acb5a..4047a80 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ same name as the corresponding test. ## Changelog -#### [???] +#### [Unreleased] - Add `serde_dhall::from_file` to read a Dhall file directly. - BREAKING CHANGE: reworked most of the `serde_dhall` API @@ -207,6 +207,9 @@ same name as the corresponding test. - Initial release + +[Unreleased]: https://github.com/Nadrieril/dhall-rust/compare/serde_dhall-v0.4.0...HEAD + ## License Licensed under the terms of the 2-Clause BSD License ([LICENSE](LICENSE) or diff --git a/abnf_to_pest/Cargo.toml b/abnf_to_pest/Cargo.toml index 1567512..a6ecff3 100644 --- a/abnf_to_pest/Cargo.toml +++ b/abnf_to_pest/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "abnf_to_pest" -version = "0.2.0" # remember to update html_root_url +# remember to update html_root_url +version = "0.2.0" authors = ["Nadrieril "] license = "MIT OR Apache-2.0" edition = "2018" diff --git a/dhall/Cargo.toml b/dhall/Cargo.toml index bb60d9e..aa01a05 100644 --- a/dhall/Cargo.toml +++ b/dhall/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dhall" -version = "0.4.0" # remember to update html_root_url +# remember to update html_root_url +version = "0.4.0" authors = ["NanoTech ", "Nadrieril "] license = "BSD-2-Clause" description = "Implementation of the Dhall configuration language" diff --git a/dhall_proc_macros/Cargo.toml b/dhall_proc_macros/Cargo.toml index 48b55e8..8f6f1f2 100644 --- a/dhall_proc_macros/Cargo.toml +++ b/dhall_proc_macros/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "dhall_proc_macros" -version = "0.4.0" # remember to update html_root_url +# remember to update html_root_url +version = "0.4.0" authors = ["Nadrieril "] license = "BSD-2-Clause" description = "Macros for dhall" diff --git a/release.toml b/release.toml new file mode 100644 index 0000000..eef7d2a --- /dev/null +++ b/release.toml @@ -0,0 +1,10 @@ +disable-push = true +disable-publish = true +no-dev-version = true +pre-release-commit-message = "Release {{crate_name}} version {{version}}" + +[[pre-release-replacements]] +file = "src/lib.rs" +search = "\\[doc\\(html_root_url = .*\\)\\]" +replace = "[doc(html_root_url = \"https://docs.rs/{{crate_name}}/{{version}}\")]" +exactly = 1 diff --git a/serde_dhall/Cargo.toml b/serde_dhall/Cargo.toml index 6af883a..ef76032 100644 --- a/serde_dhall/Cargo.toml +++ b/serde_dhall/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "serde_dhall" -version = "0.4.0" # remember to update html_root_url, README and changelog +# remember to update html_root_url, README and changelog +version = "0.4.0" authors = ["Nadrieril "] license = "BSD-2-Clause" description = "Dhall support for serde" diff --git a/serde_dhall/release.toml b/serde_dhall/release.toml new file mode 100644 index 0000000..7921551 --- /dev/null +++ b/serde_dhall/release.toml @@ -0,0 +1,29 @@ +[[pre-release-replacements]] +file = "../README.md" +search = "serde_dhall = \".*\"" +replace = "{{crate_name}} = \"{{version}}\"" +exactly = 1 + +[[pre-release-replacements]] +file = "../README.md" +search = "#### \\[Unreleased\\]" +replace = "#### \\[Unreleased\\]\n\n#### [{{version}}] - {{date}}" +exactly = 1 + +[[pre-release-replacements]] +file = "../README.md" +search = "\\[Unreleased\\]:" +replace = "[{{version}}]:" +exactly = 1 + +[[pre-release-replacements]] +file = "../README.md" +search = "\\.\\.\\.HEAD" +replace = "...{{tag_name}}" +exactly = 1 + +[[pre-release-replacements]] +file = "../README.md" +search = "" +replace = "\n[Unreleased]: https://github.com/Nadrieril/dhall-rust/compare/{{tag_name}}...HEAD" +exactly = 1 -- cgit v1.2.3 From ce99949256550753ed246d0baeab24019399dfdd Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 5 Apr 2020 19:26:33 +0100 Subject: Release abnf_to_pest version 0.5.0 --- Cargo.lock | 4 ++-- abnf_to_pest/Cargo.toml | 2 +- abnf_to_pest/src/lib.rs | 2 +- dhall/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e5a25e4..6e4bae1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,7 +10,7 @@ dependencies = [ [[package]] name = "abnf_to_pest" -version = "0.2.0" +version = "0.5.0" dependencies = [ "abnf 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -138,7 +138,7 @@ dependencies = [ name = "dhall" version = "0.4.0" dependencies = [ - "abnf_to_pest 0.2.0", + "abnf_to_pest 0.5.0", "annotate-snippets 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/abnf_to_pest/Cargo.toml b/abnf_to_pest/Cargo.toml index a6ecff3..6e4cfe7 100644 --- a/abnf_to_pest/Cargo.toml +++ b/abnf_to_pest/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "abnf_to_pest" # remember to update html_root_url -version = "0.2.0" +version = "0.5.0" authors = ["Nadrieril "] license = "MIT OR Apache-2.0" edition = "2018" diff --git a/abnf_to_pest/src/lib.rs b/abnf_to_pest/src/lib.rs index ba8bdf2..a579493 100644 --- a/abnf_to_pest/src/lib.rs +++ b/abnf_to_pest/src/lib.rs @@ -1,4 +1,4 @@ -#![doc(html_root_url = "https://docs.rs/abnf_to_pest/0.2.0")] +#![doc(html_root_url = "https://docs.rs/abnf_to_pest/0.5.0")] //! A tiny crate that helps convert ABNF grammars to [pest][pest]. //! diff --git a/dhall/Cargo.toml b/dhall/Cargo.toml index aa01a05..8de21f5 100644 --- a/dhall/Cargo.toml +++ b/dhall/Cargo.toml @@ -31,7 +31,7 @@ version-sync = "0.8" [build-dependencies] walkdir = "2" -abnf_to_pest = { version = "0.2.0", path = "../abnf_to_pest" } +abnf_to_pest = { version = "^0.5.0", path = "../abnf_to_pest" } pest_generator = "2.1" quote = "1.0" -- cgit v1.2.3 From a18582511cf9b9503a96c496ff644868586a01b5 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 5 Apr 2020 19:26:34 +0100 Subject: Release dhall version 0.5.0 --- Cargo.lock | 4 ++-- dhall/Cargo.toml | 2 +- dhall/src/lib.rs | 2 +- serde_dhall/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6e4bae1..34baded 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -136,7 +136,7 @@ dependencies = [ [[package]] name = "dhall" -version = "0.4.0" +version = "0.5.0" dependencies = [ "abnf_to_pest 0.5.0", "annotate-snippets 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1039,7 +1039,7 @@ dependencies = [ name = "serde_dhall" version = "0.4.0" dependencies = [ - "dhall 0.4.0", + "dhall 0.5.0", "dhall_proc_macros 0.4.0", "doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/dhall/Cargo.toml b/dhall/Cargo.toml index 8de21f5..75d38f1 100644 --- a/dhall/Cargo.toml +++ b/dhall/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dhall" # remember to update html_root_url -version = "0.4.0" +version = "0.5.0" authors = ["NanoTech ", "Nadrieril "] license = "BSD-2-Clause" description = "Implementation of the Dhall configuration language" diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs index 392c344..98ad4f0 100644 --- a/dhall/src/lib.rs +++ b/dhall/src/lib.rs @@ -1,4 +1,4 @@ -#![doc(html_root_url = "https://docs.rs/dhall/0.4.0")] +#![doc(html_root_url = "https://docs.rs/dhall/0.5.0")] #![allow( clippy::implicit_hasher, clippy::module_inception, diff --git a/serde_dhall/Cargo.toml b/serde_dhall/Cargo.toml index ef76032..d894f2e 100644 --- a/serde_dhall/Cargo.toml +++ b/serde_dhall/Cargo.toml @@ -12,7 +12,7 @@ edition = "2018" [dependencies] serde = { version = "1.0", features = ["derive"] } -dhall = { version = "=0.4.0", path = "../dhall" } +dhall = { version = "= 0.5.0", path = "../dhall" } dhall_proc_macros = { version = "=0.4.0", path = "../dhall_proc_macros" } doc-comment = "0.3" reqwest = { version = "0.10", features = ["blocking"] } -- cgit v1.2.3 From e05b79108728c328967675284f14c4808477afeb Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 5 Apr 2020 19:26:34 +0100 Subject: Release dhall_proc_macros version 0.5.0 --- Cargo.lock | 4 ++-- dhall_proc_macros/Cargo.toml | 2 +- dhall_proc_macros/src/lib.rs | 2 +- serde_dhall/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 34baded..8a1fd12 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -161,7 +161,7 @@ dependencies = [ [[package]] name = "dhall_proc_macros" -version = "0.4.0" +version = "0.5.0" dependencies = [ "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1040,7 +1040,7 @@ name = "serde_dhall" version = "0.4.0" dependencies = [ "dhall 0.5.0", - "dhall_proc_macros 0.4.0", + "dhall_proc_macros 0.5.0", "doc-comment 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/dhall_proc_macros/Cargo.toml b/dhall_proc_macros/Cargo.toml index 8f6f1f2..d770aa8 100644 --- a/dhall_proc_macros/Cargo.toml +++ b/dhall_proc_macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dhall_proc_macros" # remember to update html_root_url -version = "0.4.0" +version = "0.5.0" authors = ["Nadrieril "] license = "BSD-2-Clause" description = "Macros for dhall" diff --git a/dhall_proc_macros/src/lib.rs b/dhall_proc_macros/src/lib.rs index 2178f00..9f20e2d 100644 --- a/dhall_proc_macros/src/lib.rs +++ b/dhall_proc_macros/src/lib.rs @@ -1,4 +1,4 @@ -#![doc(html_root_url = "https://docs.rs/dhall_proc_macros/0.4.0")] +#![doc(html_root_url = "https://docs.rs/dhall_proc_macros/0.5.0")] //! This crate contains the code-generation primitives for the [dhall-rust][dhall-rust] crate. //! This is highly unstable and breaks regularly; use at your own risk. //! diff --git a/serde_dhall/Cargo.toml b/serde_dhall/Cargo.toml index d894f2e..406e4d9 100644 --- a/serde_dhall/Cargo.toml +++ b/serde_dhall/Cargo.toml @@ -13,7 +13,7 @@ edition = "2018" [dependencies] serde = { version = "1.0", features = ["derive"] } dhall = { version = "= 0.5.0", path = "../dhall" } -dhall_proc_macros = { version = "=0.4.0", path = "../dhall_proc_macros" } +dhall_proc_macros = { version = "= 0.5.0", path = "../dhall_proc_macros" } doc-comment = "0.3" reqwest = { version = "0.10", features = ["blocking"] } url = "2.1" -- cgit v1.2.3 From 5aea256e3998e6f72dc79b3ea4b935647ecf5cd6 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 5 Apr 2020 19:26:34 +0100 Subject: Release serde_dhall version 0.5.0 --- Cargo.lock | 2 +- README.md | 9 ++++++--- serde_dhall/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a1fd12..d5605ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1037,7 +1037,7 @@ dependencies = [ [[package]] name = "serde_dhall" -version = "0.4.0" +version = "0.5.0" dependencies = [ "dhall 0.5.0", "dhall_proc_macros 0.5.0", diff --git a/README.md b/README.md index 4047a80..9248ea9 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -serde_dhall = "0.4.0" +serde_dhall = "0.5.0" ``` Reading Dhall files is easy and leverages the wonderful [`serde`](https://crates.io/crates/serde) library. @@ -167,7 +167,9 @@ same name as the corresponding test. ## Changelog -#### [Unreleased] +#### \[Unreleased\] + +#### [0.5.0] - 2020-04-05 - Add `serde_dhall::from_file` to read a Dhall file directly. - BREAKING CHANGE: reworked most of the `serde_dhall` API @@ -208,7 +210,8 @@ same name as the corresponding test. - Initial release -[Unreleased]: https://github.com/Nadrieril/dhall-rust/compare/serde_dhall-v0.4.0...HEAD +[Unreleased]: https://github.com/Nadrieril/dhall-rust/compare/serde_dhall-v0.5.0...HEAD +[0.5.0]: https://github.com/Nadrieril/dhall-rust/compare/serde_dhall-v0.4.0...serde_dhall-v0.5.0 ## License diff --git a/serde_dhall/Cargo.toml b/serde_dhall/Cargo.toml index 406e4d9..d6e8d9f 100644 --- a/serde_dhall/Cargo.toml +++ b/serde_dhall/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "serde_dhall" # remember to update html_root_url, README and changelog -version = "0.4.0" +version = "0.5.0" authors = ["Nadrieril "] license = "BSD-2-Clause" description = "Dhall support for serde" -- cgit v1.2.3 From 5a10cd2e8fac854f4f6fa152cfb1b9ad71b0d091 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 5 Apr 2020 19:27:10 +0100 Subject: Fix cargo-release substitutions --- README.md | 2 +- serde_dhall/release.toml | 8 +++++++- serde_dhall/src/lib.rs | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9248ea9..a077973 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ same name as the corresponding test. ## Changelog -#### \[Unreleased\] +#### [Unreleased] #### [0.5.0] - 2020-04-05 diff --git a/serde_dhall/release.toml b/serde_dhall/release.toml index 7921551..d15cf88 100644 --- a/serde_dhall/release.toml +++ b/serde_dhall/release.toml @@ -1,3 +1,9 @@ +[[pre-release-replacements]] +file = "src/lib.rs" +search = "\\[doc\\(html_root_url = .*\\)\\]" +replace = "[doc(html_root_url = \"https://docs.rs/{{crate_name}}/{{version}}\")]" +exactly = 1 + [[pre-release-replacements]] file = "../README.md" search = "serde_dhall = \".*\"" @@ -7,7 +13,7 @@ exactly = 1 [[pre-release-replacements]] file = "../README.md" search = "#### \\[Unreleased\\]" -replace = "#### \\[Unreleased\\]\n\n#### [{{version}}] - {{date}}" +replace = "#### [Unreleased]\n\n#### [{{version}}] - {{date}}" exactly = 1 [[pre-release-replacements]] diff --git a/serde_dhall/src/lib.rs b/serde_dhall/src/lib.rs index c478b2a..bff8989 100644 --- a/serde_dhall/src/lib.rs +++ b/serde_dhall/src/lib.rs @@ -1,4 +1,4 @@ -#![doc(html_root_url = "https://docs.rs/serde_dhall/0.4.0")] +#![doc(html_root_url = "https://docs.rs/serde_dhall/0.5.0")] #![warn(missing_docs, missing_doc_code_examples)] //! [Dhall][dhall] is a programmable configuration language that provides a non-repetitive //! alternative to JSON and YAML. -- cgit v1.2.3