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 header only api singletons (#1520) #1604

Merged
merged 7 commits into from
Sep 13, 2022

Conversation

marcalff
Copy link
Member

@marcalff marcalff commented Sep 9, 2022

This fix is for gcc and clang only.

Fixes #1520

Changes

Add compiler annotations to make singleton methods visible.
This is needed by the linker to ensure uniqueness of singletons.

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

This fix is for gcc and clang only.
@marcalff marcalff requested a review from a team September 9, 2022 13:34
@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #1604 (02e78bb) into main (cfaf8a1) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1604      +/-   ##
==========================================
+ Coverage   85.22%   85.30%   +0.09%     
==========================================
  Files         156      156              
  Lines        4978     4978              
==========================================
+ Hits         4242     4246       +4     
+ Misses        736      732       -4     
Impacted Files Coverage Δ
api/include/opentelemetry/baggage/baggage.h 97.33% <100.00%> (ø)
...ntelemetry/context/propagation/global_propagator.h 100.00% <100.00%> (ø)
...pi/include/opentelemetry/context/runtime_context.h 97.60% <100.00%> (ø)
api/include/opentelemetry/metrics/provider.h 100.00% <100.00%> (ø)
api/include/opentelemetry/trace/provider.h 100.00% <100.00%> (ø)
api/include/opentelemetry/trace/trace_state.h 97.60% <100.00%> (ø)
sdk/src/trace/batch_span_processor.cc 91.41% <0.00%> (+1.57%) ⬆️
api/include/opentelemetry/trace/noop.h 93.11% <0.00%> (+6.90%) ⬆️

Copy link
Member

@owent owent left a comment

Choose a reason for hiding this comment

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

Should we disable component_c .. component_f and keep component_a and component_b on Windows?

api/test/singleton/CMakeLists.txt Outdated Show resolved Hide resolved
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.

LGTM, can we merged once conflict is resolved.

@marcalff
Copy link
Member Author

LGTM, can we merged once conflict is resolved.

@lalitb

Thanks.
Merge conflicts now resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants