Skip to content

Commit 1b8693a

Browse files
committed
Updated bunch of deps, cleaned up code
1 parent 59adb43 commit 1b8693a

File tree

7 files changed

+20
-747
lines changed

7 files changed

+20
-747
lines changed

MODULE.bazel

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ bazel_dep(name = "boringssl", version = "0.20250415.0")
1818
bazel_dep(name = "curl", version = "8.8.0.bcr.3")
1919
bazel_dep(name = "depend_on_what_you_use", version = "0.8.0")
2020
bazel_dep(name = "google_benchmark", version = "1.9.2")
21-
bazel_dep(name = "googletest", version = "1.16.0.bcr.1")
22-
# bazel_dep(name = "apple_support", version = "1.19.0")
23-
# bazel_dep(name = "rules_apple", version = "3.19.1")
24-
# # Getting "No 'swiftc.exe' executable found in Path" with 3.18.0
25-
# single_version_override(module_name = "rules_apple", version = "3.17.1")
21+
bazel_dep(name = "googletest", version = "1.17.0")
2622
bazel_dep(name = "re2", version = "2024-07-02.bcr.1")
2723
bazel_dep(name = "rules_go", version = "0.54.0")
2824
bazel_dep(name = "gazelle", version = "0.43.0")
@@ -53,17 +49,7 @@ archive_override(
5349
strip_prefix="c-ares-0b0d375f08edfc73d2f37090e9325c5bd600c043"
5450
)
5551
bazel_dep(name = "protobuf", version = "30.2")
56-
bazel_dep(name = "opentelemetry-proto", version = "1.5.0")
57-
archive_override(
58-
module_name = "opentelemetry-proto",
59-
integrity = "sha256-CPQGNq28XzPSCEvY57ZOSR3QI50alQIdv/vfHKjOpFQ=",
60-
patch_strip = 1,
61-
patches = [
62-
"bazel/opentelemetry-proto.patch",
63-
],
64-
strip_prefix = "opentelemetry-proto-1.5.0",
65-
urls = ["https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v1.5.0.tar.gz"]
66-
)
52+
bazel_dep(name = "opentelemetry-proto", version = "1.6.0")
6753
bazel_dep(name = "prometheus-cpp", version = "1.3.0.bcr.2")
6854
bazel_dep(name = "civetweb", version = "1.16.bcr.1")
6955

api/include/opentelemetry/common/macros.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,6 @@ point.
544544
#endif
545545
#define OPENTELEMETRY_OPTION_USE_STD_SPAN 0 // Use the nostd version, std::span is in C++2020
546546

547-
#ifdef OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
548-
#undef OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
549-
#endif
550-
#define OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS 1
551-
552547
#ifdef OPENTELEMETRY_HAVE_EXCEPTIONS
553548
#undef OPENTELEMETRY_HAVE_EXCEPTIONS
554549
#endif
@@ -633,7 +628,6 @@ point.
633628
"+stl:" OPENTELEMETRY_STR(OPENTELEMETRY_STL_VERSION) \
634629
"+rtti:" OPENTELEMETRY_STR(OPENTELEMETRY_RTTI_ENABLED) \
635630
"+std_span:" OPENTELEMETRY_STR(OPENTELEMETRY_OPTION_USE_STD_SPAN) \
636-
"+type_traits:" OPENTELEMETRY_STR(OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS) \
637631
"+have_excpts:" OPENTELEMETRY_STR(OPENTELEMETRY_HAVE_EXCEPTIONS) \
638632
"+abi:" OPENTELEMETRY_STR(OPENTELEMETRY_ABI_VERSION_NO) \
639633
"+exemplar:" OPENTELEMETRY_STR(ENABLE_METRICS_EXEMPLAR_PREVIEW) \

api/include/opentelemetry/nostd/type_traits.h

Lines changed: 2 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,12 @@
55

66
#include "opentelemetry/version.h"
77

8-
#if defined(OPENTELEMETRY_STL_VERSION)
9-
# if OPENTELEMETRY_STL_VERSION >= 2011
10-
# include "opentelemetry/std/type_traits.h"
11-
# define OPENTELEMETRY_HAVE_STD_TYPE_TRAITS
12-
# endif
8+
#if !defined(OPENTELEMETRY_STL_VERSION) || (OPENTELEMETRY_STL_VERSION < 2017)
9+
#error OPENTELEMETRY_STL_VERSION must be >= 2017
1310
#endif
1411

1512
#include <type_traits>
1613

17-
#if !defined(OPENTELEMETRY_HAVE_STD_TYPE_TRAITS)
18-
# include <array>
19-
20-
# include "opentelemetry/nostd/detail/void.h" // IWYU pragma: export
21-
#endif
22-
23-
#if !defined(__GLIBCXX__) || (defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7) || \
24-
(defined(__GLIBCXX__) && __GLIBCXX__ >= 20150422) // >= libstdc++-5
25-
# define OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
26-
#endif
27-
2814
OPENTELEMETRY_BEGIN_NAMESPACE
2915
namespace nostd
3016
{
@@ -77,60 +63,8 @@ struct remove_all_extents<std::array<T, N>> : remove_all_extents<T>
7763
template <typename T>
7864
using remove_all_extents_t = typename remove_all_extents<T>::type;
7965

80-
#if defined(OPENTELEMETRY_STL_VERSION) && OPENTELEMETRY_STL_VERSION >= 2017
8166
using std::is_nothrow_swappable;
8267
using std::is_swappable;
83-
#else
84-
/**
85-
* Back port of std::is_swappable
86-
*/
87-
namespace detail
88-
{
89-
namespace swappable
90-
{
91-
92-
using std::swap;
93-
94-
template <typename T>
95-
struct is_swappable
96-
{
97-
private:
98-
template <typename U, typename = decltype(swap(std::declval<U &>(), std::declval<U &>()))>
99-
inline static std::true_type test(int);
100-
101-
template <typename U>
102-
inline static std::false_type test(...);
103-
104-
public:
105-
static constexpr bool value = decltype(test<T>(0))::value;
106-
};
107-
108-
} // namespace swappable
109-
} // namespace detail
110-
111-
using detail::swappable::is_swappable;
112-
113-
/**
114-
* Back port of std::is_swappable
115-
*/
116-
namespace detail
117-
{
118-
namespace swappable
119-
{
120-
template <bool IsSwappable, typename T>
121-
struct is_nothrow_swappable
122-
{
123-
static constexpr bool value = noexcept(swap(std::declval<T &>(), std::declval<T &>()));
124-
};
125-
126-
template <typename T>
127-
struct is_nothrow_swappable<false, T> : std::false_type
128-
{};
129-
} // namespace swappable
130-
} // namespace detail
131-
template <typename T>
132-
using is_nothrow_swappable = detail::swappable::is_nothrow_swappable<is_swappable<T>::value, T>;
133-
#endif
13468

13569
/**
13670
* Back port of
@@ -139,35 +73,9 @@ using is_nothrow_swappable = detail::swappable::is_nothrow_swappable<is_swappabl
13973
* std::is_trivialy_copy_assignable
14074
* std::is_trivialy_move_assignable
14175
*/
142-
#ifdef OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
14376
using std::is_trivially_copy_assignable;
14477
using std::is_trivially_copy_constructible;
14578
using std::is_trivially_move_assignable;
14679
using std::is_trivially_move_constructible;
147-
#else
148-
template <typename T>
149-
struct is_trivially_copy_constructible
150-
{
151-
static constexpr bool value = std::is_copy_constructible<T>::value && __has_trivial_copy(T);
152-
};
153-
154-
template <typename T>
155-
struct is_trivially_move_constructible
156-
{
157-
static constexpr bool value = __is_trivial(T);
158-
};
159-
160-
template <typename T>
161-
struct is_trivially_copy_assignable
162-
{
163-
static constexpr bool value = std::is_copy_assignable<T>::value && __has_trivial_assign(T);
164-
};
165-
166-
template <typename T>
167-
struct is_trivially_move_assignable
168-
{
169-
static constexpr bool value = __is_trivial(T);
170-
};
171-
#endif
17280
} // namespace nostd
17381
OPENTELEMETRY_END_NAMESPACE

0 commit comments

Comments
 (0)