From f0ad704304bc7a870ecd3eeb6a811e59ed6da893 Mon Sep 17 00:00:00 2001 From: Adam Cimarosti Date: Thu, 3 Apr 2025 17:19:53 +0100 Subject: [PATCH 1/2] Bump version to 0.1.1 --- README.md | 56 ++++++++++++++++++++++++++- questdb-confstr-ffi/Cargo.toml | 4 +- questdb-confstr-ffi/cpp_test/test.cpp | 2 +- questdb-confstr-ffi/src/lib.rs | 2 +- questdb-confstr/Cargo.toml | 2 +- questdb-confstr/src/lib.rs | 4 +- questdb-confstr/tests/tests.rs | 2 +- 7 files changed, 62 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d448a0b..47723f5 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This is for: ## Dev notes -To build and test: +## Build and test ``` cargo clean @@ -17,8 +17,60 @@ cd questdb-confstr-ffi/cpp_test ./run ``` +## Linting + In addition, before pushing a PR, please run: ``` cargo fmt --all cargo clippy --all-targets -- -D warnings -``` \ No newline at end of file +``` + +## Cutting a release + +Let us assume we want to cut version `0.1.1` and the current version is `0.1.0`. + +1. New branch +```shell +git switch -c v0.1.1 +``` + +2. Update the version in both `Cargo.toml` files + +```shell +$EDITOR questdb-confstr/Cargo.toml +$EDITOR questdb-confstr-ffi/Cargo.toml +``` + +3. Re-run all tests and lints + +Don't forget about _clippy_: The newest version of Rust might have picked up +some new lints that we need to fix. + +4. Commit the changes and create a PR +```shell +git add -u +git commit -m "Bump version to 0.1.1" +git push --set-upstream origin v0.1.1 +``` + +N.B: _We don't need to update any `Cargo.lock` files for the ffi crate since +there are no dependencies._ + +5. Create a new PR, get it reviewed and merge it + +https://github.com/questdb/questdb-confstr-rs/pull/new/ + +6. Publish both crates to crates.io + +```shell +cargo login + +(cd questdb-confstr && cargo publish --dry-run) +(cd questdb-confstr-ffi && cargo publish --dry-run) + +(cd questdb-confstr && cargo publish) +(cd questdb-confstr && cargo publish) +``` + +(If in doubt, see the +"[Publishing on crates.io](https://doc.rust-lang.org/cargo/reference/publishing.html)" guide) \ No newline at end of file diff --git a/questdb-confstr-ffi/Cargo.toml b/questdb-confstr-ffi/Cargo.toml index 240f470..ff3c892 100644 --- a/questdb-confstr-ffi/Cargo.toml +++ b/questdb-confstr-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "questdb-confstr-ffi" -version = "0.1.0" +version = "0.1.1" edition = "2021" license = "Apache-2.0" description = "C FFI bindings for questdb-confstr" @@ -13,4 +13,4 @@ authors = ["Adam Cimarosti "] questdb-confstr = { path = "../questdb-confstr", version = "0.1.0" } [lib] -crate-type = ["lib", "staticlib"] \ No newline at end of file +crate-type = ["lib", "staticlib"] diff --git a/questdb-confstr-ffi/cpp_test/test.cpp b/questdb-confstr-ffi/cpp_test/test.cpp index fd4188c..1842412 100644 --- a/questdb-confstr-ffi/cpp_test/test.cpp +++ b/questdb-confstr-ffi/cpp_test/test.cpp @@ -6,7 +6,7 @@ * \__\_\\__,_|\___||___/\__|____/|____/ * * Copyright (c) 2014-2019 Appsicle - * Copyright (c) 2019-2024 QuestDB + * Copyright (c) 2019-2025 QuestDB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/questdb-confstr-ffi/src/lib.rs b/questdb-confstr-ffi/src/lib.rs index e9568a7..de1f873 100644 --- a/questdb-confstr-ffi/src/lib.rs +++ b/questdb-confstr-ffi/src/lib.rs @@ -6,7 +6,7 @@ * \__\_\\__,_|\___||___/\__|____/|____/ * * Copyright (c) 2014-2019 Appsicle - * Copyright (c) 2019-2024 QuestDB + * Copyright (c) 2019-2025 QuestDB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/questdb-confstr/Cargo.toml b/questdb-confstr/Cargo.toml index 88bc865..4c221e1 100644 --- a/questdb-confstr/Cargo.toml +++ b/questdb-confstr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "questdb-confstr" -version = "0.1.0" +version = "0.1.1" edition = "2021" license = "Apache-2.0" description = "A parser for a configuration string format handling service names and parameters" diff --git a/questdb-confstr/src/lib.rs b/questdb-confstr/src/lib.rs index 3d9b6ad..6ddca6f 100644 --- a/questdb-confstr/src/lib.rs +++ b/questdb-confstr/src/lib.rs @@ -6,7 +6,7 @@ * \__\_\\__,_|\___||___/\__|____/|____/ * * Copyright (c) 2014-2019 Appsicle - * Copyright (c) 2019-2024 QuestDB + * Copyright (c) 2019-2025 QuestDB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -101,7 +101,7 @@ impl<'a> PartialEq<&'a ErrorKind> for ErrorKind { } } -impl<'a> PartialEq for &'a ErrorKind { +impl PartialEq for &ErrorKind { fn eq(&self, other: &ErrorKind) -> bool { *self == other } diff --git a/questdb-confstr/tests/tests.rs b/questdb-confstr/tests/tests.rs index 19eda16..3613c6f 100644 --- a/questdb-confstr/tests/tests.rs +++ b/questdb-confstr/tests/tests.rs @@ -6,7 +6,7 @@ * \__\_\\__,_|\___||___/\__|____/|____/ * * Copyright (c) 2014-2019 Appsicle - * Copyright (c) 2019-2024 QuestDB + * Copyright (c) 2019-2025 QuestDB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 605f21ec7232b11b282a962085c3550b8e14316b Mon Sep 17 00:00:00 2001 From: Adam Cimarosti Date: Thu, 3 Apr 2025 17:30:48 +0100 Subject: [PATCH 2/2] developer notes --- DEV_NOTES.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 75 +++------------------------------------------------ 2 files changed, 79 insertions(+), 72 deletions(-) create mode 100644 DEV_NOTES.md diff --git a/DEV_NOTES.md b/DEV_NOTES.md new file mode 100644 index 0000000..64eb0d3 --- /dev/null +++ b/DEV_NOTES.md @@ -0,0 +1,76 @@ +# Dev notes + +## Build and test + +``` +cargo clean +cargo build +cargo test +cd questdb-confstr-ffi/cpp_test +./compile +./run +``` + +## Linting + +In addition, before pushing a PR, please run: +``` +cargo fmt --all +cargo clippy --all-targets -- -D warnings +``` + +## Cutting a release + +Let us assume we want to cut version `0.1.1` and the current version is `0.1.0`. + +### 1. New branch +```shell +git switch -c v0.1.1 +``` + +### 2. Update the version in both `Cargo.toml` files + +```shell +$EDITOR questdb-confstr/Cargo.toml +$EDITOR questdb-confstr-ffi/Cargo.toml +``` + +### 3. Re-run all tests and lints + +Don't forget about _clippy_: The newest version of Rust might have picked up +some new lints that we need to fix. + +### 4. Commit the changes and create a PR +```shell +git add -u +git commit -m "Bump version to 0.1.1" +git push --set-upstream origin v0.1.1 +``` + +N.B: _We don't need to update any `Cargo.lock` files for the ffi crate since +there are no dependencies._ + +### 5. Create a new PR, get it reviewed and merge it + +https://github.com/questdb/questdb-confstr-rs/pull/new/ + +### 6. Publish both crates to crates.io + +```shell +cargo login + +(cd questdb-confstr && cargo publish --dry-run) +(cd questdb-confstr-ffi && cargo publish --dry-run) + +(cd questdb-confstr && cargo publish) +(cd questdb-confstr && cargo publish) +``` + +(If in doubt, see the +"[Publishing on crates.io](https://doc.rust-lang.org/cargo/reference/publishing.html)" guide) + +### 7. Write the release notes + +* [Create a new release](https://github.com/questdb/questdb-confstr-rs/releases) on GitHub. +* Specify what changed in the release notes. +* Keep it readable (not autogenerated) and short. diff --git a/README.md b/README.md index 47723f5..65cf586 100644 --- a/README.md +++ b/README.md @@ -1,76 +1,7 @@ # QuestDB configuration string parser -This is for: -* The [questdb-confstr](./questdb-confstr) crate +Consists of: +* The [questdb-confstr](./questdb-confstr) crate (documents grammar) * and its bindings for C [questdb-confstr-ffi](./questdb-confstr-ffi) -## Dev notes - -## Build and test - -``` -cargo clean -cargo build -cargo test -cd questdb-confstr-ffi/cpp_test -./compile -./run -``` - -## Linting - -In addition, before pushing a PR, please run: -``` -cargo fmt --all -cargo clippy --all-targets -- -D warnings -``` - -## Cutting a release - -Let us assume we want to cut version `0.1.1` and the current version is `0.1.0`. - -1. New branch -```shell -git switch -c v0.1.1 -``` - -2. Update the version in both `Cargo.toml` files - -```shell -$EDITOR questdb-confstr/Cargo.toml -$EDITOR questdb-confstr-ffi/Cargo.toml -``` - -3. Re-run all tests and lints - -Don't forget about _clippy_: The newest version of Rust might have picked up -some new lints that we need to fix. - -4. Commit the changes and create a PR -```shell -git add -u -git commit -m "Bump version to 0.1.1" -git push --set-upstream origin v0.1.1 -``` - -N.B: _We don't need to update any `Cargo.lock` files for the ffi crate since -there are no dependencies._ - -5. Create a new PR, get it reviewed and merge it - -https://github.com/questdb/questdb-confstr-rs/pull/new/ - -6. Publish both crates to crates.io - -```shell -cargo login - -(cd questdb-confstr && cargo publish --dry-run) -(cd questdb-confstr-ffi && cargo publish --dry-run) - -(cd questdb-confstr && cargo publish) -(cd questdb-confstr && cargo publish) -``` - -(If in doubt, see the -"[Publishing on crates.io](https://doc.rust-lang.org/cargo/reference/publishing.html)" guide) \ No newline at end of file +See the [developer notes](./DEV_NOTES.md) for more details on building, testing and cutting a release. \ No newline at end of file