Skip to content

Commit

Permalink
Revert "Update the config crate from 0.13.4 to 0.14.0"
Browse files Browse the repository at this point in the history
This reverts commit 2ec9497.

We do unfortunately have to downgrade since `config 0.14.0` [0] converts
all configuration keys to lowercase but some of our configuration keys,
e.g. the environment variables, are case sensitive.
More details are in the relevant upstream PR [1] that made the crate
case insensitive by converting all the keys to lowercase "internally"
and a new issue discussing this change/regression [2].
Unfortunately this wasn't really mentioned as a breaking change in the
upstream config-rs changelog so I missed it.
This fixes such errors:
```
Error: build command failed

Caused by:
    0: Checking allowed variable names
    1: Checking allowed variables for package tree 1.8.0
    2: Environment variable name not allowed: additional_make_flags
```

I didn't notice this regression at first as I relied on the tests but
they don't catch such errors yet. I'll try to add a test case for this
error and check the environment variables defined in `pkg.toml` files
during the loading of the repository (should yield better error messages
and we do want to verify **all** packages and during the loading of the
repository ("evaluation")).

[0]: https://github.com/mehcode/config-rs/blob/0.14.0/CHANGELOG.md#0140---2024-02-01
[1]: rust-cli/config-rs#354
[2]: rust-cli/config-rs#531
  • Loading branch information
primeos-work committed Feb 29, 2024
1 parent 01f2ff7 commit 4c6f027
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
27 changes: 24 additions & 3 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 @@ -32,7 +32,7 @@ chrono = "0.4"
clap = { version = "4", features = ["cargo"] }
clap_complete = "4"
colored = "2"
config = { version = "0.14", default-features = false, features = [ "toml" ] }
config = { version = "0.13", default-features = false, features = [ "toml" ] }
csv = "1"
daggy = { version = "0.8", features = [ "serde" ] }
dialoguer = "0.11"
Expand Down

0 comments on commit 4c6f027

Please sign in to comment.