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

[NO-TICKET] RFC: Add logger gem as dependency to prepare for future Ruby versions #4257

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitlab/install_datadog_deps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@
'DD_PROFILING_NO_EXTENSION' => 'true',
}

# ADD NEW DEPENDENCIES HERE
[
'datadog-ruby_core_source',
'ffi',
'libddwaf',
'msgpack',
'libdatadog', # libdatadog MUST be installed before datadog to ensure libdatadog native extension is compiled
'logger',
'datadog',
].each do |gem|
version = gem_version_mapping.delete(gem)
Expand Down
10 changes: 10 additions & 0 deletions datadog.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ Gem::Specification.new do |spec|
# (and yes we have a test for it)
spec.add_dependency 'libdatadog', '~> 14.3.1.1.0'

# Will no longer be a default gem on Ruby 3.5, see
# https://github.com/ruby/ruby/commit/d7e558e3c48c213d0e8bedca4fb547db55613f7c and
# https://stdgems.org/ .
# We support all versions of this gem and don't particularly require any version restriction.
spec.add_dependency 'logger'

# Tip: When adding or removing dependencies, search the codebase for the string
# ADD NEW DEPENDENCIES HERE
# to find out a few more places that need to be kept in-sync.

spec.extensions = [
'ext/datadog_profiling_native_extension/extconf.rb',
'ext/datadog_profiling_loader/extconf.rb',
Expand Down
2 changes: 2 additions & 0 deletions lib-injection/host_inject_main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,14 @@ def bundler_supported?
injection_failure = false

# This is order dependent
# ADD NEW DEPENDENCIES HERE
[
'msgpack',
'ffi',
'datadog-ruby_core_source',
'libdatadog',
'libddwaf',
'logger',
'datadog'
].each do |gem|
fork do
Expand Down
4 changes: 3 additions & 1 deletion spec/datadog/release_gem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@
# check `install_datadog_deps.rb` for details
expect(gem_version_mapping.keys).to contain_exactly(
# This list MUST NOT derive from the `gemspec.dependencies`,
# since it is used to alarm when dependencies modified.
# since it is used to alarm when dependencies are modified.
# ADD NEW DEPENDENCIES HERE
'datadog',
'datadog-ruby_core_source',
'ffi',
'libdatadog',
'libddwaf',
'msgpack',
'logger',
)
end
end
Expand Down
Loading