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

Prevent lint warnings if internal-logs features is not enabled. #2196

Merged
merged 4 commits into from
Oct 13, 2024

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Oct 11, 2024

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)

@lalitb lalitb requested a review from a team as a code owner October 11, 2024 17:56
Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

LGTM!

#[cfg(not(feature = "internal-logs"))]
const _: () = {
let _ = $name;
};
Copy link
Member Author

Choose a reason for hiding this comment

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

const here will (double) ensure that the rust compiler will optimize out this at compile-time, and so no runtime code generated.

@lalitb lalitb marked this pull request as draft October 11, 2024 18:00
@lalitb
Copy link
Member Author

lalitb commented Oct 11, 2024

moving to draft to fix some CI.

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.2%. Comparing base (af4527c) to head (9518568).
Report is 3 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2196   +/-   ##
=====================================
  Coverage   79.1%   79.2%           
=====================================
  Files        121     121           
  Lines      20879   20870    -9     
=====================================
- Hits       16534   16532    -2     
+ Misses      4345    4338    -7     

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

@lalitb lalitb marked this pull request as ready for review October 13, 2024 07:05
@lalitb lalitb merged commit bacb3da into open-telemetry:main Oct 13, 2024
22 of 23 checks passed
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