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

Fix some deprecated api calls and clippy reports #74

Merged
merged 5 commits into from
May 25, 2024

Conversation

funArash
Copy link
Contributor

Fixes #
Design discussion issue (if applicable) #

Changes

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@funArash funArash requested a review from a team as a code owner May 24, 2024 20:20
Copy link

linux-foundation-easycla bot commented May 24, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@funArash funArash changed the title Fix some depricated api calles and clippy reports Fix some deprecated api calls and clippy reports May 24, 2024
Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

Thanks

@lalitb
Copy link
Member

lalitb commented May 24, 2024

Can you also remove the exclusion of this project from Cargo.toml, so the build can be verified.

Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.3%. Comparing base (56a6f45) to head (ac64f19).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main     #74     +/-   ##
=======================================
+ Coverage   52.3%   53.3%   +1.0%     
=======================================
  Files         38      38             
  Lines       4967    5026     +59     
=======================================
+ Hits        2598    2680     +82     
+ Misses      2369    2346     -23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lalitb
Copy link
Member

lalitb commented May 24, 2024

@funArash - There are some errors in CI build for Datadog if you can fix in this PR. Thanks.

 Documenting opentelemetry-datadog v0.10.0 (/home/runner/work/opentelemetry-rust-contrib/opentelemetry-rust-contrib/opentelemetry-datadog)
error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:162:21
    |
162 |                 not(feature = "surf-client"),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `-D unexpected-cfgs` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`

error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:168:17
    |
168 |                 feature = "surf-client"
    |                 ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:172:21
    |
172 |                 not(feature = "surf-client"),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

error: could not document `opentelemetry-datadog`

@funArash
Copy link
Contributor Author

@funArash - There are some errors in CI build for Datadog if you can fix in this PR. Thanks.

 Documenting opentelemetry-datadog v0.10.0 (/home/runner/work/opentelemetry-rust-contrib/opentelemetry-rust-contrib/opentelemetry-datadog)
error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:162:21
    |
162 |                 not(feature = "surf-client"),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `-D unexpected-cfgs` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`

error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:168:17
    |
168 |                 feature = "surf-client"
    |                 ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

error: unexpected `cfg` condition value: `surf-client`
   --> opentelemetry-datadog/src/exporter/mod.rs:172:21
    |
172 |                 not(feature = "surf-client"),
    |                     ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `agent-sampling`, `reqwest`, `reqwest-blocking-client`, `reqwest-client`, and `surf`
    = help: consider adding `surf-client` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

error: could not document `opentelemetry-datadog`

I cannot repo the errors locally.. am I missing something?

export CARGO_INCREMENTAL=0    
export RUSTDOCFLAGS=-Dwarnings

cargo doc --all-features --no-deps

@funArash
Copy link
Contributor Author

found it.. cargo +nightly doc --all-features --no-deps reproed the errors

@cijothomas cijothomas merged commit 086961e into open-telemetry:main May 25, 2024
9 checks passed
@funArash funArash deleted the arash/clippy_fixes branch May 25, 2024 04:42
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.

None yet

3 participants