Skip to content

Commit

Permalink
Drop dependency to env_logger
Browse files Browse the repository at this point in the history
From the looks of it, proc-macro crates' dependencies are treated a bit
differently by Cargo than those of library crates. In particular, they
are not "inherited" by (and, hence, available in) the consuming crate.
As such, the dependency to env_logger that we had specified all along
was effectively unused: while we emitted code that requires the
dependency to be available, it still had to be specified explicitly in
the crate making use of test-env-log.
This change fixes the confusion by converting the dependency to a
dev-only one. We require still require it for testing because our tests
execute the emitted code.
  • Loading branch information
d-e-s-o committed Jan 9, 2020
1 parent e049f04 commit db6e700
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Unreleased
----------
- Dropped `env_logger` dependency


0.2.1
-----
- Relicensed project under terms of `Apache-2.0 OR MIT`
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ gitlab = { repository = "d-e-s-o/test-env-log", branch = "master" }
proc-macro = true

[dependencies]
env_logger = {version = "0.7", default-features = false}
proc-macro2 = "1.0"
quote = {version = "1.0"}
syn = {version = "1.0", features = ["full"]}

[dev-dependencies]
env_logger = {version = "0.7", default-features = false}
log = "0.4"
tokio = {version = "0.2", default-features = false, features = ["rt-core", "macros"]}

0 comments on commit db6e700

Please sign in to comment.