-
Notifications
You must be signed in to change notification settings - Fork 35
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
Automatically include dependencies #37
Conversation
1f8d999
to
7c2be36
Compare
Needed some elbow grease to get minimum versions working, but this is green now. |
Very cool! Will take a closer look later this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good. I'd prefer we move the macros stuff into macros/
in the workspace root instead of crates/test-log-macros
(crate name is fine, though). Can you please revert format changes that snug in as part of the lib.rs
code move?
I think we are going to have to adjust the publish
workflow to accommodate, but I guess I can take care of that.
The other thing is, with this change users loose the ability to indirectly control additional features of, say, tracing-subscriber
. E.g., earlier a project could add
tracing-subscriber = {version = "0.3.17", default-features = false, features = ["ansi", "env-filter", "fmt"]}
and would get colored traces. This no longer works. I don't think it's a deal breaker, but it kind of sucks. But I guess the set of features this applies to is limited, and given that env_logger
supports colored output now as well, we may as well expose a color
feature ourselves. But that can come later.
Cargo.toml
Outdated
@@ -28,27 +28,27 @@ tracing infrastructure before running tests. | |||
include = ["src/lib.rs", "LICENSE-*", "README.md", "CHANGELOG.md"] | |||
|
|||
[lib] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the empty section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
.github/workflows/test.yml
Outdated
# Probably fixed by https://github.com/rust-lang-nursery/lazy-static.rs/pull/107. | ||
- run: cargo +nightly update lazy_static --precise 1.0.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use this stuff instead: https://github.com/d-e-s-o/websocket-util/blob/47d11990cf0a3c03ab9097c4c85d331dff60e92d/Cargo.toml#L35-L38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I had put it in [workspace]
members = ["crates/*"] otherwise this list needs an update any time a new crate is added to the workspace. Let me know if you insist.
Done. That snuck in because I ran
I've changed the optional dependencies version specs to use |
I think it's fine to update the list when a new member is added and would go so far to say that listing each explicitly is, well, more explicit. I just can't get myself to liking the
To be honest, it seems to work with and without your changes now. No idea what I did or didn't do yesterday. Regarding your change: Will this mean that if |
- Move macros to a new test-log-macros crate. - Export env_logger and tracing_subscriber from the test-log crate. - Macros emit test_log::{env_logger,tracing_subscriber} references. Removes the need for users to explicitly depend on additional crates. Fixes d-e-s-o#36.
Done.
Done. |
Removes the need for users to explicitly depend on additional crates.
Fixes #36.