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

opentelemetry: fix broken build with default-features = false #1949

Merged
merged 3 commits into from
Feb 21, 2022

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Feb 21, 2022

Motivation

Currently, tracing-opentelemetry v0.17.1 fails to compile with
default-features = false. This is because there's a let binding for
normalized_metadata with a None where the Some type can't be
inferred. This managed to slip past CI and get released because we were
never actually building the crate with its default features disabled, an
oversight in our CI configuration.

Solution

This branch fixes the issue by adding an explicit type annotation to the
let binding, so the Option's type is known and the type error no
longer occurs. I also removed a feature-flagged import that was not
actually used.

I also added tracing-opentelemetry to the cargo hack CI job. This
way, we will now ensure that all its feature combinations are built on
CI (including no features), which should prevent this kind of thing from
occurring in the future. Without the fix, we can confirm that this job does
fail: https://github.com/tokio-rs/tracing/runs/5279139893?check_suite_focus=true

Fixes #1944

This should ensure that all its feature combinations actually get
tested.
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw marked this pull request as ready for review February 21, 2022 19:38
@hawkw hawkw requested review from jtescher, a team and davidbarsky as code owners February 21, 2022 19:38
@hawkw hawkw changed the title [WIP] opentelemetry: fix broken build with default-features = false opentelemetry: fix broken build with default-features = false Feb 21, 2022
@hawkw hawkw enabled auto-merge (squash) February 21, 2022 19:40
@davidbarsky davidbarsky disabled auto-merge February 21, 2022 19:42
@davidbarsky davidbarsky enabled auto-merge (squash) February 21, 2022 19:42
@davidbarsky davidbarsky merged commit c38b5aa into master Feb 21, 2022
@davidbarsky davidbarsky deleted the eliza/fix-otel-default-features branch February 21, 2022 19:45
hawkw added a commit that referenced this pull request Feb 21, 2022
## Motivation

Currently, `tracing-opentelemetry` v0.17.1 fails to compile with
`default-features = false`. This is because there's a `let` binding for
`normalized_metadata` with a `None` where the `Some` type can't be
inferred. This managed to slip past CI and get released because we were
never actually building the crate with its default features disabled, an
oversight in our CI configuration.

## Solution

This branch fixes the issue by adding an explicit type annotation to the
`let` binding, so the `Option`'s type is known and the type error no
longer occurs. I also removed a feature-flagged import that was not
actually used.

I also added `tracing-opentelemetry` to the `cargo hack` CI job. This
way, we will now ensure that all its feature combinations are built on
CI (including no features), which should prevent this kind of thing from
occurring in the future. Without the fix, we can confirm that this job does
fail: https://github.com/tokio-rs/tracing/runs/5279139893?check_suite_focus=true

Fixes  #1944
hawkw added a commit that referenced this pull request Feb 21, 2022
## Motivation

Currently, `tracing-opentelemetry` v0.17.1 fails to compile with
`default-features = false`. This is because there's a `let` binding for
`normalized_metadata` with a `None` where the `Some` type can't be
inferred. This managed to slip past CI and get released because we were
never actually building the crate with its default features disabled, an
oversight in our CI configuration.

## Solution

This branch fixes the issue by adding an explicit type annotation to the
`let` binding, so the `Option`'s type is known and the type error no
longer occurs. I also removed a feature-flagged import that was not
actually used.

I also added `tracing-opentelemetry` to the `cargo hack` CI job. This
way, we will now ensure that all its feature combinations are built on
CI (including no features), which should prevent this kind of thing from
occurring in the future. Without the fix, we can confirm that this job does
fail: https://github.com/tokio-rs/tracing/runs/5279139893?check_suite_focus=true

Fixes  #1944
hawkw added a commit that referenced this pull request Feb 21, 2022
# 0.17.2 (February 21, 2022)

This release fixes [an issue][#1944] introduced in v0.17.1 where
`tracing-opentelemetry` could not be compiled with
`default-features = false`.

### Fixed

- Compilation failure with `tracing-log` feature disabled ([#1949])

[#1949]: #1917
[#1944]: #1944
hawkw added a commit that referenced this pull request Feb 21, 2022
# 0.17.2 (February 21, 2022)

This release fixes [an issue][#1944] introduced in v0.17.1 where
`tracing-opentelemetry` could not be compiled with
`default-features = false`.

### Fixed

- Compilation failure with `tracing-log` feature disabled ([#1949])

[#1949]: #1917
[#1944]: #1944
kaffarell pushed a commit to kaffarell/tracing that referenced this pull request May 22, 2024
…o-rs#1949)

## Motivation

Currently, `tracing-opentelemetry` v0.17.1 fails to compile with
`default-features = false`. This is because there's a `let` binding for
`normalized_metadata` with a `None` where the `Some` type can't be
inferred. This managed to slip past CI and get released because we were
never actually building the crate with its default features disabled, an
oversight in our CI configuration.

## Solution

This branch fixes the issue by adding an explicit type annotation to the
`let` binding, so the `Option`'s type is known and the type error no
longer occurs. I also removed a feature-flagged import that was not
actually used.

I also added `tracing-opentelemetry` to the `cargo hack` CI job. This
way, we will now ensure that all its feature combinations are built on
CI (including no features), which should prevent this kind of thing from
occurring in the future. Without the fix, we can confirm that this job does
fail: https://github.com/tokio-rs/tracing/runs/5279139893?check_suite_focus=true

Fixes  tokio-rs#1944
kaffarell pushed a commit to kaffarell/tracing that referenced this pull request May 22, 2024
# 0.17.2 (February 21, 2022)

This release fixes [an issue][tokio-rs#1944] introduced in v0.17.1 where
`tracing-opentelemetry` could not be compiled with
`default-features = false`.

### Fixed

- Compilation failure with `tracing-log` feature disabled ([tokio-rs#1949])

[tokio-rs#1949]: tokio-rs#1917
[tokio-rs#1944]: tokio-rs#1944
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.

tracing-opentelemetry 0.17.1 does not compile with default-features = false
2 participants