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

subscriber: fix LocalTime being re-exported by the time feature #1685

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Oct 25, 2021

Motivation

Currently, the pub use re-export for the LocalTime struct is enabled
whenever the "time" feature flag is enabled. However, this type only
exists when the "local-time" feature flag is enabled, so enabling only
the time feature results in a compilation error.

Solution

This commit adds a separate pub use for LocalTime that's only
enabled when the "local-time" feature is enabled.

Fixes #1683

Currently, the `pub use` re-export for the `LocalTime` struct is enabled
whenever the "time" feature flag is enabled. However, this type only
_exists_ when the "local-time" feature flag is enabled, so enabling only
the `time` feature results in a compilation error.

This commit adds a separate `pub use` for `LocalTime` that's only
enabled when the "local-time" feature is enabled.

Fixes #1683
@hawkw hawkw self-assigned this Oct 25, 2021
@hawkw hawkw requested review from davidbarsky and a team as code owners October 25, 2021 16:18
@hawkw hawkw merged commit a5aab95 into master Oct 25, 2021
@hawkw hawkw deleted the eliza/fix-time-flag branch October 25, 2021 16:33
hawkw added a commit that referenced this pull request Oct 25, 2021
…1685)

## Motivation

Currently, the `pub use` re-export for the `LocalTime` struct is enabled
whenever the "time" feature flag is enabled. However, this type only
_exists_ when the "local-time" feature flag is enabled, so enabling only
the `time` feature results in a compilation error.

## Solution

This commit adds a separate `pub use` for `LocalTime` that's only
enabled when the "local-time" feature is enabled.

Fixes #1683
hawkw added a commit that referenced this pull request Oct 25, 2021
# 0.3.1 (Oct 25, 2021)

This release fixes a few issues related to feature flagging.

### Fixed

- **time**: Compilation error when enabling the "time" feature flag
  without also enabling the "local-time" feature flag ([#1685])
- **registry**: Unused method warnings when the "std" feature is enabled
  but the "registry" feature is disabled ([#1686])

[#1685]: #1685
[#1686]: #1686
hawkw added a commit that referenced this pull request Oct 25, 2021
# 0.3.1 (Oct 25, 2021)

This release fixes a few issues related to feature flagging.

### Fixed

- **time**: Compilation error when enabling the "time" feature flag
  without also enabling the "local-time" feature flag ([#1685])
- **registry**: Unused method warnings when the "std" feature is enabled
  but the "registry" feature is disabled ([#1686])

[#1685]: #1685
[#1686]: #1686
kaffarell pushed a commit to kaffarell/tracing that referenced this pull request May 22, 2024
# 0.3.1 (Oct 25, 2021)

This release fixes a few issues related to feature flagging.

### Fixed

- **time**: Compilation error when enabling the "time" feature flag
  without also enabling the "local-time" feature flag ([tokio-rs#1685])
- **registry**: Unused method warnings when the "std" feature is enabled
  but the "registry" feature is disabled ([tokio-rs#1686])

[tokio-rs#1685]: tokio-rs#1685
[tokio-rs#1686]: tokio-rs#1686
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.

Compilation error when compiling tracing-subscriber 0.3 with time but without local-time
2 participants