Skip to content

Commit

Permalink
Added mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff committed May 18, 2024
1 parent e8b636a commit cb4beee
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/iwyu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
iwyu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'

Expand All @@ -33,9 +33,10 @@ jobs:
- name: Prepare CMake
run: |
TOPDIR=`pwd`
mkdir build && cd build
CC="clang" CXX="clang++" cmake \
-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="include-what-you-use;-w;-Xiwyu;--verbose=1" \
-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="include-what-you-use;-w;-Xiwyu;--mapping_file=${TOPDIR}/.iwyu.imp;--verbose=1" \
-DBUILD_TESTING=OFF \
-DBUILD_W3CTRACECONTEXT_TEST=OFF \
..
Expand All @@ -45,7 +46,7 @@ jobs:
cd build
make -k 2>&1 | tee -a iwyu.log
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: Logs (include-what-you-use)
Expand Down
13 changes: 13 additions & 0 deletions .iwyu.imp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

# include-what-you-use mapping file

[
# Work around for C++ STL
{ "include": ["<bits/chrono.h>", "private", "<chrono>", "public"] },

# Local opentelemetry-cpp

]

2 changes: 1 addition & 1 deletion api/include/opentelemetry/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include "opentelemetry/common/macros.h"
#include "opentelemetry/common/macros.h" // IWYU pragma: export
#include "opentelemetry/detail/preprocessor.h"

#ifndef OPENTELEMETRY_ABI_VERSION_NO
Expand Down
7 changes: 0 additions & 7 deletions sdk/include/opentelemetry/sdk/trace/tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,8 @@
OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk
{
namespace resource
{
class Resource;
} // namespace resource

namespace trace
{
class IdGenerator;
class SpanProcessor;

using namespace opentelemetry::sdk::instrumentationscope;

Expand Down
1 change: 1 addition & 0 deletions sdk/src/resource/resource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <unordered_map>
#include <utility>
#include <string>

#include "opentelemetry/nostd/variant.h"
#include "opentelemetry/sdk/resource/resource.h"
Expand Down

0 comments on commit cb4beee

Please sign in to comment.