Skip to content

Commit 1348bf2

Browse files
committed
Move back to D:\ - also go back to VS2019 compiler
2 parents f5b1024 + e79967b commit 1348bf2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1349
-62
lines changed

.bazelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ build:windows --copt="/Zc:strictStrings" --copt="/Gy" --copt="-DG
5050
build:windows --host_copt="/Zc:strictStrings" --host_copt="/Gy" --host_copt="-DGPR_DISABLE_ABSEIL_SYNC"
5151
build:windows --host_linkopt="shell32.lib"
5252
# Requires Visual Studio 2019 Build Tools installed in default location with the latest compiler (14.29.30133) for x64
53-
build:windows --action_env=BAZEL_VC_FULL_VERSION=14.42.34433 --action_env=BAZEL_WINSDK_FULL_VERSION=10.0.26100.0
54-
build:windows --host_action_env=BAZEL_VC_FULL_VERSION=14.42.34433 --host_action_env=BAZEL_WINSDK_FULL_VERSION=10.0.26100.0
53+
build:windows --action_env=BAZEL_VC_FULL_VERSION=14.29.30133 --action_env=BAZEL_WINSDK_FULL_VERSION=10.0.26100.0
54+
build:windows --host_action_env=BAZEL_VC_FULL_VERSION=14.29.30133 --host_action_env=BAZEL_WINSDK_FULL_VERSION=10.0.26100.0
5555

5656
# Set minimum supported C++ version
5757
build:macos --host_cxxopt=-std=c++17 --cxxopt=-std=c++17

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.3.1
1+
8.4.0rc1

.github/workflows/otel_sdk.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
- "*"
99
branches:
1010
- main
11+
env:
12+
# D: drive used to be disabled for some time (Jul-Aug 2025)
13+
# Though it's back, and d:\ seems to be faster than c:\
14+
# Note that we mount the d:\d.vhdx under c:\d but it'll still use d:\
15+
VHDX_FILE: d:/d.vhdx
1116
jobs:
1217
otel_sdk_build:
1318
name: build otel_sdk
@@ -103,15 +108,15 @@ jobs:
103108
}
104109
- uses: actions/cache/restore@v4
105110
with:
106-
path: c:/d.vhdx
111+
path: ${{ env.VHDX_FILE }}
107112
enableCrossOsArchive: true
108113
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', 'MODULE.bazel.lock') }}
109114
restore-keys: ${{ runner.os }}-bazel-
110115
- name: mount cache disk
111116
run: |
112117
New-Item -Path c:/d -ItemType "directory" -Force -Verbose
113-
If (-not(Test-Path c:/d.vhdx)) {
114-
$vhd = New-VHD -Path c:/d.vhdx -SizeBytes 137438953472 -Dynamic -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096 -Verbose
118+
If (-not(Test-Path ${{ env.VHDX_FILE }})) {
119+
$vhd = New-VHD -Path ${{ env.VHDX_FILE }} -SizeBytes 137438953472 -Dynamic -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096 -Verbose
115120
$vhd
116121
$mnt = Mount-VHD -Path $vhd.path -NoDriveLetter -Verbose -PassThru | Out-Host
117122
$mnt
@@ -122,44 +127,44 @@ jobs:
122127
$part
123128
$vol = Format-Volume -FileSystem ReFS -Partition $part -Verbose
124129
$vol
125-
Dismount-VHD -Path c:/d.vhdx -Verbose
130+
Dismount-VHD -Path ${{ env.VHDX_FILE }} -Verbose
126131
}
127-
$part = Mount-VHD -Path c:/d.vhdx -NoDriveLetter -Verbose -PassThru | Get-Disk | Get-Partition | Where-Object -Not IsHidden
132+
$part = Mount-VHD -Path ${{ env.VHDX_FILE }} -NoDriveLetter -Verbose -PassThru | Get-Disk | Get-Partition | Where-Object -Not IsHidden
128133
$part
129134
$part | Add-PartitionAccessPath -AccessPath c:/d -Verbose
130-
ls c:/d.vhdx
135+
ls ${{ env.VHDX_FILE }}
131136
echo empty > c:\d\empty.txt
132137
cmd /c "dir c:\d || echo swallowing errors"
133-
refsutil dedup c:\d /s
138+
rem refsutil dedup c:\d /s
134139
- name: build minimal otel_sdk
135140
# On the CI, the github runner does not have constant vs2022 msvc release, but has the same vs2019 (14.29.30133)
141+
# echo "build:windows --action_env=BAZEL_VC_FULL_VERSION=14.29.30133" >> ../top.bazelrc
142+
# echo "build:windows --host_action_env=BAZEL_VC_FULL_VERSION=14.42.34438" >> ../top.bazelrc
136143
run: |
137-
echo "build:windows --action_env=BAZEL_VC_FULL_VERSION=14.29.30133" >> ../top.bazelrc
138-
echo "build:windows --host_action_env=BAZEL_VC_FULL_VERSION=14.42.34438" >> ../top.bazelrc
139144
echo "common --remote_download_minimal" >> ../top.bazelrc
140145
echo "build --disk_cache=c:/d" >> ../top.bazelrc
141-
echo "common --repository_cache=c:/r" >> ../top.bazelrc
142-
echo "startup --output_user_root=c:/b" >> ../top.bazelrc
146+
echo "common --repository_cache=d:/r" >> ../top.bazelrc
147+
echo "startup --output_user_root=d:/b" >> ../top.bazelrc
143148
./otel_sdk_build.cmd minimal
144149
./otel_sdk_build.cmd shutdown
145150
- run: |
146151
cmd /c "dir c:\ || echo swallowing errors"
147152
cmd /c "dir d:\ || echo swallowing errors"
148153
cmd /c "dir c:\d || echo swallowing errors"
149-
Dismount-VHD -Path "c:/d.vhdx" -Verbose
150-
ls c:/d.vhdx
151-
Resize-VHD -Path "c:/d.vhdx" -ToMinimumSize -Verbose -ErrorAction SilentlyContinue
152-
ls c:/d.vhdx
154+
Dismount-VHD -Path "${{ env.VHDX_FILE }}" -Verbose
155+
ls ${{ env.VHDX_FILE }}
156+
Resize-VHD -Path "${{ env.VHDX_FILE }}" -ToMinimumSize -Verbose -ErrorAction SilentlyContinue
157+
ls ${{ env.VHDX_FILE }}
153158
- uses: actions/cache/save@v4
154159
# Don't update cache on releases
155160
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
156161
env:
157162
ZSTD_CLEVEL: 1 # 1 (fastest) .. 19 (slowest)
158163
with:
159-
path: c:/d.vhdx
164+
path: ${{ env.VHDX_FILE }}
160165
enableCrossOsArchive: true
161166
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', 'MODULE.bazel.lock') }}
162-
- run: Mount-VHD -Path "c:/d.vhdx" -NoDriveLetter -Verbose -PassThru | Out-Host
167+
- run: Mount-VHD -Path "${{ env.VHDX_FILE }}" -NoDriveLetter -Verbose -PassThru | Out-Host
163168
- uses: actions/upload-artifact@v4
164169
with:
165170
name: tracing-profiles
@@ -172,7 +177,7 @@ jobs:
172177
- run: ./otel_sdk_build.cmd shutdown
173178
- run: cmd /c "dir c:\ || echo swallowing errors"
174179
- run: cmd /c "dir d:\ || echo swallowing errors"
175-
- run: ls c:/d.vhdx
180+
- run: ls ${{ env.VHDX_FILE }}
176181
- uses: actions/upload-artifact@v4
177182
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
178183
with:

CMakeLists.txt

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,17 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.20.0")
1515
cmake_policy(SET CMP0117 NEW)
1616
endif()
1717

18-
project(opentelemetry-cpp)
18+
set(OPENTELEMETRY_VERSION_NUMBER "1.22.0")
19+
set(OPENTELEMETRY_VERSION_SUFFIX "")
20+
set(OPENTELEMETRY_VERSION
21+
"${OPENTELEMETRY_VERSION_NUMBER}${OPENTELEMETRY_VERSION_SUFFIX}")
22+
23+
set(OPENTELEMETRY_ABI_VERSION_DEFAULT "1")
24+
25+
project(
26+
opentelemetry-cpp
27+
VERSION "${OPENTELEMETRY_VERSION_NUMBER}"
28+
LANGUAGES CXX)
1929

2030
# Mark variables as used so cmake doesn't complain about them
2131
mark_as_advanced(CMAKE_TOOLCHAIN_FILE)
@@ -56,9 +66,6 @@ endif()
5666
option(WITH_ABI_VERSION_1 "ABI version 1" ON)
5767
option(WITH_ABI_VERSION_2 "EXPERIMENTAL: ABI version 2 preview" OFF)
5868

59-
file(READ "${CMAKE_CURRENT_LIST_DIR}/api/include/opentelemetry/version.h"
60-
OPENTELEMETRY_CPP_HEADER_VERSION_H)
61-
6269
#
6370
# We do not want to have WITH_ABI_VERSION = "1" or "2", and instead prefer two
6471
# distinct flags, WITH_ABI_VERSION_1 and WITH_ABI_VERSION_2.
@@ -88,31 +95,9 @@ if(WITH_ABI_VERSION_2)
8895
elseif(WITH_ABI_VERSION_1)
8996
set(OPENTELEMETRY_ABI_VERSION_NO "1")
9097
else()
91-
if(OPENTELEMETRY_CPP_HEADER_VERSION_H MATCHES
92-
"OPENTELEMETRY_ABI_VERSION_NO[ \t\r\n]+\"?([0-9]+)\"?")
93-
math(EXPR OPENTELEMETRY_ABI_VERSION_NO ${CMAKE_MATCH_1})
94-
else()
95-
message(
96-
FATAL_ERROR
97-
"OPENTELEMETRY_ABI_VERSION_NO not found on ${CMAKE_CURRENT_LIST_DIR}/api/include/opentelemetry/version.h"
98-
)
99-
endif()
98+
set(OPENTELEMETRY_ABI_VERSION_NO "${OPENTELEMETRY_ABI_VERSION_DEFAULT}")
10099
endif()
101100

102-
message(STATUS "OPENTELEMETRY_ABI_VERSION_NO=${OPENTELEMETRY_ABI_VERSION_NO}")
103-
104-
if(OPENTELEMETRY_CPP_HEADER_VERSION_H MATCHES
105-
"OPENTELEMETRY_VERSION[ \t\r\n]+\"?([^\"]+)\"?")
106-
set(OPENTELEMETRY_VERSION ${CMAKE_MATCH_1})
107-
else()
108-
message(
109-
FATAL_ERROR
110-
"OPENTELEMETRY_VERSION not found on ${CMAKE_CURRENT_LIST_DIR}/api/include/opentelemetry/version.h"
111-
)
112-
endif()
113-
114-
message(STATUS "OPENTELEMETRY_VERSION=${OPENTELEMETRY_VERSION}")
115-
116101
option(WITH_NO_DEPRECATED_CODE "Do not include deprecated code" OFF)
117102

118103
set(WITH_STL
@@ -478,7 +463,7 @@ endif()
478463
message(STATUS "---------------------------------------------")
479464
message(STATUS "build settings")
480465
message(STATUS "---------------------------------------------")
481-
message(STATUS "OpenTelemetry: ${OPENTELEMETRY_VERSION}")
466+
message(STATUS "OpenTelemetry VERSION: ${OPENTELEMETRY_VERSION}")
482467
message(STATUS "OpenTelemetry ABI: ${OPENTELEMETRY_ABI_VERSION_NO}")
483468
message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
484469
message(STATUS "CXX: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
@@ -667,3 +652,13 @@ if(OPENTELEMETRY_INSTALL)
667652
include(CPack)
668653
endif()
669654
endif()
655+
656+
# Make the version and ABI version available to the user for in-tree builds
657+
# These are the same variables that are cached with
658+
# find_package(opentelemetry-cpp CONFIG)
659+
set(OPENTELEMETRY_ABI_VERSION_NO
660+
"${OPENTELEMETRY_ABI_VERSION_NO}"
661+
CACHE STRING "opentelemetry-cpp ABI version" FORCE)
662+
set(OPENTELEMETRY_VERSION
663+
"${OPENTELEMETRY_VERSION}"
664+
CACHE STRING "opentelemetry-cpp version" FORCE)

api/include/opentelemetry/common/string_util.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
#pragma once
55

6+
#include <ctype.h>
7+
8+
#include "opentelemetry/nostd/string_view.h"
69
#include "opentelemetry/version.h"
710
#include "opentelemetry/nostd/string_view.h"
811

cmake/otel-install-functions.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,13 +487,11 @@ function(otel_install_cmake_config)
487487
"${PROJECT_SOURCE_DIR}/cmake/templates/opentelemetry-cpp-config.cmake.in"
488488
"${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}/${PROJECT_NAME}-config.cmake"
489489
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
490-
PATH_VARS OPENTELEMETRY_ABI_VERSION_NO OPENTELEMETRY_VERSION PROJECT_NAME
491-
INCLUDE_INSTALL_DIR CMAKE_INSTALL_LIBDIR)
490+
PATH_VARS INCLUDE_INSTALL_DIR CMAKE_INSTALL_LIBDIR)
492491

493492
# Write version file for find_package(opentelemetry-cpp CONFIG)
494493
write_basic_package_version_file(
495494
"${CMAKE_CURRENT_BINARY_DIR}/cmake/${PROJECT_NAME}/${PROJECT_NAME}-config-version.cmake"
496-
VERSION ${OPENTELEMETRY_VERSION}
497495
COMPATIBILITY ExactVersion)
498496

499497
install(

cmake/templates/opentelemetry-cpp-config.cmake.in

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,13 @@ endforeach()
211211
# handle the QUIETLY and REQUIRED arguments and set opentelemetry-cpp_FOUND to
212212
# TRUE if all variables listed contain valid results, e.g. valid file paths.
213213
include("FindPackageHandleStandardArgs")
214+
215+
set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG ${CMAKE_CURRENT_LIST_FILE})
216+
214217
find_package_handle_standard_args(
215-
${CMAKE_FIND_PACKAGE_NAME}
216-
FOUND_VAR ${CMAKE_FIND_PACKAGE_NAME}_FOUND
217-
REQUIRED_VARS OPENTELEMETRY_CPP_INCLUDE_DIRS OPENTELEMETRY_CPP_LIBRARIES)
218+
${CMAKE_FIND_PACKAGE_NAME}
219+
CONFIG_MODE
220+
REQUIRED_VARS OPENTELEMETRY_CPP_INCLUDE_DIRS OPENTELEMETRY_CPP_LIBRARIES)
218221

219222
if(${CMAKE_FIND_PACKAGE_NAME}_FOUND)
220223
set(OPENTELEMETRY_CPP_FOUND
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Copyright The OpenTelemetry Authors
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
set -e
7+
8+
# To run tests in a local dev environment:
9+
# - set BUILD_DIR to the top level build directory,
10+
11+
[ -z "${BUILD_DIR}" ] && export BUILD_DIR="${HOME}/build"
12+
13+
export EXAMPLE_BIN_DIR="${BUILD_DIR}/examples/configuration/"
14+
15+
# Make sure `example_yaml` is in the path
16+
export PATH=${PATH}:${EXAMPLE_BIN_DIR}
17+
18+
shelltest ./shelltests
19+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
$ example_yaml --test --yaml shelltests/disabled_empty.yaml
5+
>
6+
MODEL PARSED
7+
SDK CREATED
8+
>= 0
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
file_format: 1.0.0
5+
disabled:

0 commit comments

Comments
 (0)