Skip to content

Commit 71d533f

Browse files
authored
Merge pull request #676 from tisonkun/drop-really-old-trick
ci: drop really old trick and ensure MSRV for all feature combo
2 parents 35161d0 + 50c2018 commit 71d533f

File tree

8 files changed

+53
-111
lines changed

8 files changed

+53
-111
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: CI
22
on: [push, pull_request]
33

4+
# Ensure only read permission is granted
45
permissions:
5-
contents: read # to fetch code (actions/checkout)
6+
contents: read
67

78
jobs:
89
test:
910
name: Test
1011
runs-on: ${{ matrix.os }}
1112
strategy:
1213
matrix:
13-
build: [stable, beta, nightly, macos, win32, win64, mingw]
1414
include:
1515
- build: stable
1616
os: ubuntu-latest
@@ -34,65 +34,52 @@ jobs:
3434
os: windows-latest
3535
rust: stable-x86_64-pc-windows-gnu
3636
steps:
37-
- uses: actions/checkout@master
38-
- name: Install Rust
37+
- uses: actions/checkout@v4
38+
- name: Install toolchain
3939
run: |
4040
rustup update ${{ matrix.rust }} --no-self-update
4141
rustup default ${{ matrix.rust }}
42-
cargo install cargo-hack
43-
- run: cargo hack test --feature-powerset --lib --exclude-features max_level_off,max_level_error,max_level_warn,max_level_info,max_level_debug,max_level_trace,release_max_level_off,release_max_level_error,release_max_level_warn,release_max_level_info,release_max_level_debug,release_max_level_trace
42+
cargo +stable install cargo-hack --locked
43+
- run: cargo hack test --feature-powerset --exclude-features max_level_off,max_level_error,max_level_warn,max_level_info,max_level_debug,max_level_trace,release_max_level_off,release_max_level_error,release_max_level_warn,release_max_level_info,release_max_level_debug,release_max_level_trace
4444
- run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml
4545
- run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release
4646

47-
rustfmt:
48-
name: Rustfmt
47+
check:
48+
name: Check Format and Clippy
4949
runs-on: ubuntu-latest
5050
steps:
51-
- uses: actions/checkout@master
52-
- name: Install Rust
51+
- uses: actions/checkout@v4
52+
- name: Install toolchain
5353
run: |
5454
rustup update stable --no-self-update
5555
rustup default stable
56-
rustup component add rustfmt
57-
# log repo does not use Cargo workspaces, so `cargo fmt` will not check all the code
58-
# perhaps this should be changed in the future
56+
rustup component add clippy rustfmt
5957
- run: cargo fmt -- --check
6058
- run: cargo fmt --manifest-path test_max_level_features/Cargo.toml -- --check
61-
- run: cargo fmt --manifest-path tests/Cargo.toml -- --check
62-
63-
clippy:
64-
name: Clippy
65-
runs-on: ubuntu-latest
66-
steps:
67-
- uses: actions/checkout@master
68-
- name: Install Rust
69-
run: |
70-
rustup update stable --no-self-update
71-
rustup default stable
72-
rustup component add clippy
7359
- run: cargo clippy --verbose
7460
- run: cargo clippy --verbose --manifest-path test_max_level_features/Cargo.toml
75-
- run: cargo clippy --verbose --manifest-path tests/Cargo.toml
7661

7762
doc:
7863
name: Check Documentation
7964
runs-on: ubuntu-latest
8065
steps:
81-
- uses: actions/checkout@master
82-
- name: Install Rust
66+
- uses: actions/checkout@v4
67+
- name: Install toolchain
8368
run: |
8469
rustup update stable --no-self-update
8570
rustup default stable
8671
rustup component add rust-docs
8772
- name: Run rustdoc
88-
run: RUSTDOCFLAGS="-D warnings" cargo doc --verbose --features std,serde,sval,sval_ref,value-bag,kv,kv_std,kv_sval,kv_serde
73+
env:
74+
RUSTDOCFLAGS: "-D warnings"
75+
run: cargo doc --verbose --features std,serde,sval,sval_ref,value-bag,kv,kv_std,kv_sval,kv_serde
8976

9077
features:
9178
name: Feature check
9279
runs-on: ubuntu-latest
9380
steps:
94-
- uses: actions/checkout@master
95-
- name: Install Rust
81+
- uses: actions/checkout@v4
82+
- name: Install toolchain
9683
run: |
9784
rustup update nightly --no-self-update
9885
rustup default nightly
@@ -107,8 +94,8 @@ jobs:
10794
name: Minimal versions
10895
runs-on: ubuntu-latest
10996
steps:
110-
- uses: actions/checkout@master
111-
- name: Install Rust
97+
- uses: actions/checkout@v4
98+
- name: Install toolchain
11299
run: |
113100
rustup update nightly --no-self-update
114101
rustup default nightly
@@ -123,21 +110,22 @@ jobs:
123110
name: MSRV
124111
runs-on: ubuntu-latest
125112
steps:
126-
- uses: actions/checkout@master
127-
- name: Install Rust
113+
- uses: actions/checkout@v4
114+
- name: Install toolchain
128115
run: |
129-
rustup update 1.60.0 --no-self-update
130-
rustup default 1.60.0
131-
- run: |
132-
cargo test --verbose --manifest-path tests/Cargo.toml
133-
cargo test --verbose --manifest-path tests/Cargo.toml --features kv
116+
rustup update 1.61.0 --no-self-update
117+
rustup default 1.61.0
118+
cargo +stable install cargo-hack --locked
119+
- run: cargo hack test --feature-powerset --exclude-features max_level_off,max_level_error,max_level_warn,max_level_info,max_level_debug,max_level_trace,release_max_level_off,release_max_level_error,release_max_level_warn,release_max_level_info,release_max_level_debug,release_max_level_trace
120+
- run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml
121+
- run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release
134122

135123
embedded:
136124
name: Embedded
137125
runs-on: ubuntu-latest
138126
steps:
139-
- uses: actions/checkout@master
140-
- name: Install Rust
127+
- uses: actions/checkout@v4
128+
- name: Install toolchain
141129
run: |
142130
rustup update stable --no-self-update
143131
rustup default stable

CHANGELOG.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
## [Unreleased]
44

5+
### Notable Changes
6+
* MSRV is bumped to 1.61.0 in https://github.com/rust-lang/log/pull/676
7+
58
## [0.4.27] - 2025-03-24
69

7-
## What's Changed
10+
### What's Changed
811
* A few minor lint fixes by @nyurik in https://github.com/rust-lang/log/pull/671
912
* Enable clippy support for format-like macros by @nyurik in https://github.com/rust-lang/log/pull/665
1013
* Add an optional logger param by @tisonkun in https://github.com/rust-lang/log/pull/664
@@ -13,9 +16,10 @@
1316

1417
**Full Changelog**: https://github.com/rust-lang/log/compare/0.4.26...0.4.27
1518

19+
1620
## [0.4.26] - 2025-02-18
1721

18-
## What's Changed
22+
### What's Changed
1923
* Derive `Clone` for `kv::Value` by @SpriteOvO in https://github.com/rust-lang/log/pull/668
2024
* Add `spdlog-rs` link to crate doc by @SpriteOvO in https://github.com/rust-lang/log/pull/669
2125

@@ -24,23 +28,23 @@
2428

2529
## [0.4.25] - 2025-01-14
2630

27-
## What's Changed
31+
### What's Changed
2832
* Revert loosening of kv cargo features by @KodrAus in https://github.com/rust-lang/log/pull/662
2933

3034

3135
**Full Changelog**: https://github.com/rust-lang/log/compare/0.4.24...0.4.25
3236

3337
## [0.4.24] - 2025-01-11
3438

35-
## What's Changed
39+
### What's Changed
3640
* Fix up kv feature activation by @KodrAus in https://github.com/rust-lang/log/pull/659
3741

3842

3943
**Full Changelog**: https://github.com/rust-lang/log/compare/0.4.23...0.4.24
4044

4145
## [0.4.23] - 2025-01-10 (yanked)
4246

43-
## What's Changed
47+
### What's Changed
4448
* Fix some typos by @Kleinmarb in https://github.com/rust-lang/log/pull/637
4549
* Add logforth to implementation by @tisonkun in https://github.com/rust-lang/log/pull/638
4650
* Add `spdlog-rs` link to README by @SpriteOvO in https://github.com/rust-lang/log/pull/639
@@ -51,7 +55,7 @@
5155
* Fix up key lifetimes and add method to try get a borrowed key by @KodrAus in https://github.com/rust-lang/log/pull/653
5256
* Add Ftail implementation by @tjardoo in https://github.com/rust-lang/log/pull/652
5357

54-
## New Contributors
58+
### New Contributors
5559
* @Kleinmarb made their first contribution in https://github.com/rust-lang/log/pull/637
5660
* @tisonkun made their first contribution in https://github.com/rust-lang/log/pull/638
5761
* @SpriteOvO made their first contribution in https://github.com/rust-lang/log/pull/639
@@ -64,7 +68,7 @@
6468

6569
## [0.4.22] - 2024-06-27
6670

67-
## What's Changed
71+
### What's Changed
6872
* Add some clarifications to the library docs by @KodrAus in https://github.com/rust-lang/log/pull/620
6973
* Add links to `colog` crate by @chrivers in https://github.com/rust-lang/log/pull/621
7074
* adding line_number test + updating some testing infrastructure by @DIvkov575 in https://github.com/rust-lang/log/pull/619
@@ -75,7 +79,7 @@
7579
* Loosen orderings for logger initialization in https://github.com/rust-lang/log/pull/632. Originally by @pwoolcoc in https://github.com/rust-lang/log/pull/599
7680
* Use Location::caller() for file and line info in https://github.com/rust-lang/log/pull/633. Originally by @Cassy343 in https://github.com/rust-lang/log/pull/520
7781

78-
## New Contributors
82+
### New Contributors
7983
* @chrivers made their first contribution in https://github.com/rust-lang/log/pull/621
8084
* @DIvkov575 made their first contribution in https://github.com/rust-lang/log/pull/619
8185
* @Catamantaloedis made their first contribution in https://github.com/rust-lang/log/pull/625
@@ -84,7 +88,7 @@
8488

8589
## [0.4.21] - 2024-02-27
8690

87-
## What's Changed
91+
### What's Changed
8892
* Minor clippy nits by @nyurik in https://github.com/rust-lang/log/pull/578
8993
* Simplify Display impl by @nyurik in https://github.com/rust-lang/log/pull/579
9094
* Set all crates to 2021 edition by @nyurik in https://github.com/rust-lang/log/pull/580
@@ -104,7 +108,7 @@
104108
* Use `Acquire` ordering for initialization check by @AngelicosPhosphoros in https://github.com/rust-lang/log/pull/610
105109
* Get structured logging API ready for stabilization by @KodrAus in https://github.com/rust-lang/log/pull/613
106110

107-
## New Contributors
111+
### New Contributors
108112
* @nyurik made their first contribution in https://github.com/rust-lang/log/pull/578
109113
* @dimo414 made their first contribution in https://github.com/rust-lang/log/pull/590
110114
* @peterjoel made their first contribution in https://github.com/rust-lang/log/pull/587

Cargo.toml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,12 @@ A lightweight logging facade for Rust
1313
categories = ["development-tools::debugging"]
1414
keywords = ["logging"]
1515
exclude = ["rfcs/**/*"]
16-
rust-version = "1.60.0"
16+
rust-version = "1.61.0"
1717
edition = "2021"
1818

1919
[package.metadata.docs.rs]
2020
features = ["std", "serde", "kv_std", "kv_sval", "kv_serde"]
2121

22-
[[test]]
23-
name = "integration"
24-
path = "tests/integration.rs"
25-
harness = false
26-
27-
[[test]]
28-
name = "macros"
29-
path = "tests/macros.rs"
30-
harness = true
31-
3222
[features]
3323
max_level_off = []
3424
max_level_error = []
@@ -60,19 +50,19 @@ kv_unstable_serde = ["kv_serde", "kv_unstable_std"]
6050

6151
[dependencies]
6252
serde = { version = "1.0", optional = true, default-features = false }
63-
sval = { version = "2.1", optional = true, default-features = false }
53+
sval = { version = "2.14.1", optional = true, default-features = false }
6454
sval_ref = { version = "2.1", optional = true, default-features = false }
6555
value-bag = { version = "1.7", optional = true, default-features = false, features = ["inline-i128"] }
6656

6757
[dev-dependencies]
6858
serde = { version = "1.0", features = ["derive"] }
69-
serde_json = "1.0"
70-
serde_test = "1.0"
59+
serde_json = { version = "1.0" }
60+
serde_test = { version = "1.0" }
7161
sval = { version = "2.1" }
7262
sval_derive = { version = "2.1" }
7363
value-bag = { version = "1.7", features = ["test"] }
7464

75-
# NOTE: log doesn't actually depent on this crate. However, our dependencies,
65+
# NOTE: log doesn't actually depend on this crate. However, our dependencies,
7666
# serde and sval, dependent on version 1.0 of the crate, which has problem fixed
7767
# in 1.0.60, specifically in the following commit
7868
# https://github.com/dtolnay/proc-macro2/commit/e31d61910049e097afdd3d27c37786309082bdcb.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ implementation that is most suitable for its use case.
1818

1919
## Minimum supported `rustc`
2020

21-
`1.60.0+`
21+
`1.61.0+`
2222

2323
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.
2424

tests/Cargo.toml

Lines changed: 0 additions & 22 deletions
This file was deleted.

tests/integration.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ impl Log for Logger {
2121
}
2222
fn flush(&self) {}
2323
}
24-
#[cfg_attr(lib_build, test)]
25-
fn main() {
24+
25+
#[test]
26+
fn test_integration() {
2627
// These tests don't really make sense when static
2728
// max level filtering is applied
2829
#[cfg(not(any(

tests/src/build.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/src/lib.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)