Fix all build warnings and errors#3324
Merged
Merged
Conversation
andrewlock
force-pushed
the
andrew/fix-all-build-warnings
branch
from
October 7, 2022 15:24
ba60a00 to
abff712
Compare
This comment has been minimized.
This comment has been minimized.
zacharycmontoya
approved these changes
Oct 7, 2022
zacharycmontoya
left a comment
Contributor
There was a problem hiding this comment.
Looks great! You're a true watchman of our repo
lucaspimentel
approved these changes
Oct 7, 2022
Member
Author
Code Coverage Report 📊✔️ Merging #3324 into master will not change line coverage
View the full report for further details: Datadog.Trace Breakdown ✔️
The following classes have significant coverage changes.
View the full reports for further details: |
gleocadie
requested changes
Oct 8, 2022
Comment on lines
+98
to
+123
| set(fmt_GIT_REPO https://github.com/DataDog/fmt.git) | ||
| set(fmt_GIT_TAG 5.3.0) | ||
| if (ISARM64) | ||
| ExternalProject_Add(fmt | ||
| GIT_REPOSITORY "${fmt_GIT_REPO}" | ||
| GIT_TAG "${fmt_GIT_TAG}" | ||
| GIT_CONFIG advice.detachedHead=false | ||
| TIMEOUT 5 | ||
| CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DFMT_TEST=0 -DFMT_DOC=0 | ||
| PREFIX "${EXTERNAL_INSTALL_LOCATION}" | ||
| INSTALL_COMMAND "" | ||
| ) | ||
| else () | ||
| # This doesn't seem to work on arm64, but I'm not sure why :shrug: | ||
| execute_process( | ||
| COMMAND git clone --quiet --depth 1 --branch "${fmt_GIT_TAG}" --config advice.detachedHead=false "${fmt_GIT_REPO}" | ||
| WORKING_DIRECTORY "${OUTPUT_DEPS_DIR}" | ||
| TIMEOUT 5 | ||
| ) | ||
| ExternalProject_Add(fmt | ||
| CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DFMT_TEST=0 -DFMT_DOC=0 | ||
| SOURCE_DIR "${EXTERNAL_INSTALL_LOCATION}" | ||
| PREFIX "${EXTERNAL_INSTALL_LOCATION}" | ||
| INSTALL_COMMAND "" | ||
| ) | ||
| endif() |
Collaborator
There was a problem hiding this comment.
same comment as #3261 (comment)
a bit too complex.
you could try this instead
ExternalProject_Add(fmt
DOWNLOAD_COMMAND git clone --quiet --depth 1 --branch "${fmt_GIT_TAG}" --config advice.detachedHead=false "${fmt_GIT_REPO}"
TIMEOUT 5
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DFMT_TEST=0 -DFMT_DOC=0 .
SOURCE_DIR "${EXTERNAL_INSTALL_LOCATION}"
PREFIX "${EXTERNAL_INSTALL_LOCATION}"
INSTALL_COMMAND ""
)
…et core 2.1 Generalized and simplified(?) the install 32 bit sdk step so that it works with 64 bit too, and has less duplication
Co-authored-by: Zach Montoya <[email protected]>
andrewlock
force-pushed
the
andrew/fix-all-build-warnings
branch
from
October 10, 2022 08:32
1a267ce to
42a25d0
Compare
Member
Author
Benchmarks Report 🐌Benchmarks for #3324 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️Raw results
|
gleocadie
self-requested a review
October 10, 2022 11:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Fixes all benign build warnings and errors in CI 🎉:aww_yeah:🎉
Reason for change
Currently, this is a successful build:

After the change, just a lot of green, no more errors or warnings
Implementation details
There were several changes required:
Stop the native build from writing to stderr every time
ExternalProject_Adddoesn't add the--quietflag, which meansgit clonewrites tostderr. In the macos build, this is interpreted by Azure DevOps as a build error. That's annoying. Instead, do thegit clonemanually so we can specify--quiet, and just useExternalProject_Addto work with the pre-cloned repo. Also added--depth 1for good measure.Annoying, ARM64 apparently didn't like this change, so using the "noisy" version in that case. It's not actually noisy, because it's in a container, so doesn't matter too much, but it does bug me why it's different when we are running the same code in the same container 😬
Add missing newline to publish test results step in native unit tests
Otherwise this was interpreted as a single pattern:
No test result files matching tracer/test/**/test*.xml profiler/_build/bin/**/test*.xml were found.Fix platform compatibility checks in
Process.StartsampleIn .NET 5 and .NET 6, the compiler verifies that code works on all platforms, if not, we get warnings:
Workaround it by adding
Debug.Assert(OperatingSystem.IsWindows());, which apparently works, even in Release mode.Handle multi-line log files in the profiler logs
The profiler outputs various "multi-line" logs. The
CheckLogsForErrorsstep was using a more primitive version which was adding a warning for all of the subsequent lines.Workaround AzureDevops complaining about .NET Core 2.1
The
UseDotNet@2task (inexplicably IMO) writes a warning every time you install an out-of-date .NET core version that is in their cache:Note that this isn't saying "you won't be able to install .NET Core 2.1 soon".
To workaround it, install using the
dotnet-install.ps1script instead (which we already do for 32 bit anyway). As part of this, renamed theinstall-dotnet-sdk-32bitfile toinstall-dotnet-sdk-manually, removed some of the duplication, and update to support both x86 and x64Test coverage
The proof of the pudding is in the eating.
Other details
Supersedes #3261