Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ words:
- bigdecimal
- bytesize
- chrono
- clippy
- codecov
- confik
- dataless
Expand All @@ -15,11 +16,16 @@ words:
- indoc
- ipnetwork
- msrv
- nextest
- nixpkgs
- powerset
- rustc
- rustdoc
- rustup
- rustversion
- serde
- struct
- taplo
- tempfile
- thiserror
- trybuild
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- name: workaround MSRV issues
if: matrix.toolchain.name == 'msrv'
run: just downgrade-msrv
run: just downgrade-for-msrv

- name: Test
run: just test-no-coverage
25 changes: 8 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ categories = ["config"]
repository = "https://github.com/x52dev/confik"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.67"
rust-version = "1.70"

[patch.crates-io]
confik = { path = "confik" }
Expand Down
2 changes: 1 addition & 1 deletion confik-macros/tests/trybuild/fail-default-parse.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ error[E0277]: the trait bound `usize: From<i32>` is not satisfied
| ^----
| |
| the trait `From<i32>` is not implemented for `usize`
| this tail expression is of type `_`
| this tail expression is of type `i32`
|
= help: the following other types implement trait `From<T>`:
<usize as From<NonZeroUsize>>
Expand Down
20 changes: 5 additions & 15 deletions confik-macros/tests/trybuild/fail-field-from-unknown-type.stderr
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
error[E0412]: cannot find type `A` in this scope
--> tests/trybuild/fail-field-from-unknown-type.rs:6:21
|
5 | struct Config {
| - help: you might be missing a type parameter: `<A>`
6 | #[confik(from = A)]
| ^ not found in this scope
|
help: you might be missing a type parameter
|
5 | struct Config<A> {
| +++

error[E0412]: cannot find type `A` in this scope
--> tests/trybuild/fail-field-from-unknown-type.rs:6:21
|
6 | #[confik(from = A)]
| ^ not found in this scope

error[E0283]: type annotations needed
--> tests/trybuild/fail-field-from-unknown-type.rs:6:21
|
5 | struct Config {
| ------ in this derive macro expansion
6 | #[confik(from = A)]
| _____________________^
7 | | param: String,
| |_________^ cannot infer type
|
= note: cannot satisfy `_: Default`
= note: this error originates in the derive macro `::std::default::Default` (in Nightly builds, run with -Z macro-backtrace for more info)
2 changes: 2 additions & 0 deletions confik/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## Unreleased

- Update `bytesize` dependency to `2`.
- Update `ipnetwork` dependency to `0.21`.
- Minimum supported Rust version (MSRV) is now 1.70.

## 0.12.0

Expand Down
2 changes: 1 addition & 1 deletion confik/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ serde_json = { version = "1", optional = true }
toml = { version = "0.8", optional = true, default-features = false, features = ["parse"] }

bigdecimal = { version = "0.4", optional = true, features = ["serde"] }
bytesize = { version = "1", optional = true, features = ["serde"] }
bytesize = { version = "2", optional = true, features = ["serde"] }
camino = { version = "1", optional = true, features = ["serde1"] }
chrono = { version = "0.4.39", optional = true, default-features = false, features = ["serde"] }
ipnetwork = { version = "0.21", optional = true, features = ["serde"] }
Expand Down
2 changes: 1 addition & 1 deletion confik/src/lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Defaults are specified on a per-field basis.
This crate provides implementations of [`Configuration`] for a number of `std` types and the following third-party crates. Implementations for third-party crates are feature gated.

- `bigdecimal`: v0.4
- `bytesize`: v1
- `bytesize`: v2
- `camino`: v1
- `chrono`: v0.4
- `ipnetwork`: v0.21
Expand Down
1 change: 0 additions & 1 deletion confik/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ where
// If there was no data then we're missing values
.ok_or_else(|| Error::MissingValue(MissingValue::default()))??
.try_build()
.map_err(Into::into)
}

/// The target to be deserialized from multiple sources.
Expand Down
22 changes: 11 additions & 11 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
flake-parts.url = "github:hercules-ci/flake-parts";
};

Expand Down
7 changes: 3 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ msrv_rustup := "+" + msrv

# Downgrade dev-dependencies necessary to run MSRV checks/tests.
[private]
downgrade-msrv:
cargo update -p=trybuild --precise=1.0.90
cargo update -p=serde_with --precise=3.11.0
downgrade-for-msrv:
# no downgrades currently needed

# Test workspace using MSRV
test-msrv: downgrade-msrv (test-no-coverage msrv_rustup)
test-msrv: downgrade-for-msrv (test-no-coverage msrv_rustup)

# Test workspace without generating coverage files
[private]
Expand Down
Loading