From f9514e46293a5547e1e0b59d6e8c91f96bcf7baa Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Sat, 9 Nov 2019 22:10:32 +1000 Subject: [PATCH 1/5] fix up build and bump msrv --- .github/workflows/main.yml | 17 +++++++++++++---- Cargo.toml | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c624af6f5..6b469601b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,9 @@ jobs: steps: - uses: actions/checkout@master - name: Install Rust (rustup) - run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} + run: | + rustup update ${{ matrix.rust }} + rustup default ${{ matrix.rust }} if: matrix.os != 'macos-latest' - name: Install Rust (macos) run: | @@ -55,7 +57,10 @@ jobs: steps: - uses: actions/checkout@master - name: Install Rust - run: rustup update stable && rustup default stable && rustup component add rustfmt + run: | + rustup update stable + rustup default stable + rustup component add rustfmt - run: cargo fmt -- --check msrv: @@ -64,7 +69,9 @@ jobs: steps: - uses: actions/checkout@master - name: Install Rust - run: rustup update 1.16.0 && rustup default 1.16.0 + run: | + rustup update 1.16.0 + rustup default 1.16.0 - run: cargo build --verbose - run: cargo build --verbose --features serde - run: cargo build --verbose --features std @@ -75,6 +82,8 @@ jobs: steps: - uses: actions/checkout@master - name: Install Rust - run: rustup update stable && rustup default stable + run: | + rustup update stable + rustup default stable - run: rustup target add thumbv6m-none-eabi - run: cargo build --verbose --target=thumbv6m-none-eabi diff --git a/Cargo.toml b/Cargo.toml index b64111b9f..5ed00b037 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ kv_unstable = [] kv_unstable_sval = ["kv_unstable", "sval/fmt"] [dependencies] -cfg-if = "0.1.2" +cfg-if = "=0.1.9" serde = { version = "1.0", optional = true, default-features = false } sval = { version = "0.4.2", optional = true, default-features = false } From 967b716b5efd459f174b016145b4af0b97fc2a80 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Sun, 24 Nov 2019 13:31:23 +1000 Subject: [PATCH 2/5] try use cargo update again --- .github/workflows/main.yml | 1 + Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b469601b..caf872073 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,6 +72,7 @@ jobs: run: | rustup update 1.16.0 rustup default 1.16.0 + cargo update -p cfg-if --precise 0.1.9 - run: cargo build --verbose - run: cargo build --verbose --features serde - run: cargo build --verbose --features std diff --git a/Cargo.toml b/Cargo.toml index 5ed00b037..b64111b9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ kv_unstable = [] kv_unstable_sval = ["kv_unstable", "sval/fmt"] [dependencies] -cfg-if = "=0.1.9" +cfg-if = "0.1.2" serde = { version = "1.0", optional = true, default-features = false } sval = { version = "0.4.2", optional = true, default-features = false } From e0ec20f814bdab3ff8f00ea6ecf9e1a7ec550602 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Sun, 24 Nov 2019 13:44:26 +1000 Subject: [PATCH 3/5] try just before each commannd --- .github/workflows/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index caf872073..9381a1910 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,10 +72,15 @@ jobs: run: | rustup update 1.16.0 rustup default 1.16.0 + - run: | cargo update -p cfg-if --precise 0.1.9 - - run: cargo build --verbose - - run: cargo build --verbose --features serde - - run: cargo build --verbose --features std + cargo build --verbose + - run: | + cargo update -p cfg-if --precise 0.1.9 + cargo build --verbose --features serde + - run: | + cargo update -p cfg-if --precise 0.1.9 + cargo build --verbose --features std embedded: name: Embedded From ae59aa14de647920eec512d0b02661506c1a3609 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Sun, 24 Nov 2019 14:52:05 +1000 Subject: [PATCH 4/5] 1.31.0 it is then --- .github/workflows/main.yml | 16 +++++----------- README.md | 2 +- src/lib.rs | 19 ++++--------------- 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9381a1910..550a6ce25 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -70,17 +70,11 @@ jobs: - uses: actions/checkout@master - name: Install Rust run: | - rustup update 1.16.0 - rustup default 1.16.0 - - run: | - cargo update -p cfg-if --precise 0.1.9 - cargo build --verbose - - run: | - cargo update -p cfg-if --precise 0.1.9 - cargo build --verbose --features serde - - run: | - cargo update -p cfg-if --precise 0.1.9 - cargo build --verbose --features std + rustup update 1.31.0 + rustup default 1.31.0 + - run: cargo build --verbose + - run: cargo build --verbose --features serde + - run: cargo build --verbose --features std embedded: name: Embedded diff --git a/README.md b/README.md index e9f2573ea..399581fed 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ implementation that is most suitable for its use case. ## Minimum supported `rustc` -`1.16.0+` +`1.31.0+` This version is explicitly tested in CI and may be bumped in any release as needed. Maintaining compatibility with older compilers is a priority though, so the bar for bumping the minimum supported version is set very high. Any changes to the supported minimum version will be called out in the release notes. diff --git a/src/lib.rs b/src/lib.rs index 53fcb3c00..98b075139 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -911,28 +911,17 @@ impl<'a> RecordBuilder<'a> { /// [`Metadata::builder().build()`]: struct.MetadataBuilder.html#method.build #[inline] pub fn new() -> RecordBuilder<'a> { - #[cfg(feature = "kv_unstable")] - return RecordBuilder { + RecordBuilder { record: Record { args: format_args!(""), metadata: Metadata::builder().build(), module_path: None, file: None, line: None, + #[cfg(feature = "kv_unstable")] key_values: KeyValues(&Option::None::<(kv::Key, kv::Value)>), - }, - }; - - #[cfg(not(feature = "kv_unstable"))] - return RecordBuilder { - record: Record { - args: format_args!(""), - metadata: Metadata::builder().build(), - module_path: None, - file: None, - line: None, - }, - }; + } + } } /// Set [`args`](struct.Record.html#method.args). From 26c72b68b1ead31c83ab19e475f8fa2a67a4fb32 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 24 Nov 2019 16:29:23 -0500 Subject: [PATCH 5/5] Update lib.rs --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 98b075139..147e04201 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -920,7 +920,7 @@ impl<'a> RecordBuilder<'a> { line: None, #[cfg(feature = "kv_unstable")] key_values: KeyValues(&Option::None::<(kv::Key, kv::Value)>), - } + }, } }