Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make femme dependency optional #693

Merged
merged 1 commit into from
Sep 29, 2020
Merged

Make femme dependency optional #693

merged 1 commit into from
Sep 29, 2020

Conversation

rossmacarthur
Copy link
Contributor

Description

Make the femme dependency optional, enabled via the logger feature.

Motivation and Context

Allows you to use a different log crate and femme doesn't have to be installed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    Technically speaking this is a breaking change in the case where someone removed the logger feature and still used tide::log::LevelFilter.

Checklist:

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

It now is only installed via the `logger` feature. In order to do this
we need the `std` feature from `log` crate.
futures-util = "0.3.5"
log = { version = "0.4.8", features = ["std"] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this for?

Copy link
Contributor Author

@rossmacarthur rossmacarthur Sep 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the dependency tree looks like this

tide
   -- kv-log-macro
      -- log (features = ["kv_unstable"])
   -- femme
      -- log (features = ["kv_unstable", "std"])

However, tide actually relies on the std feature in the log crate being turned on. Otherwise you get the following error

 the trait `log::kv::value::ToValue` is not implemented for `std::string::String`

Ideal way to solve this is actually like this: yoshuawuyts/kv-log-macro#7

@Fishrock123
Copy link
Member

merging as is for now, yosh will have to address the kv-log-macro thing some other time.

@Fishrock123 Fishrock123 merged commit 8d27871 into http-rs:main Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants