diff --git a/.gitlab/install_datadog_deps.rb b/.gitlab/install_datadog_deps.rb index 08d076f4375..1cb3d823e2a 100755 --- a/.gitlab/install_datadog_deps.rb +++ b/.gitlab/install_datadog_deps.rb @@ -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) diff --git a/datadog.gemspec b/datadog.gemspec index 6991a84d70b..99f30a88c21 100644 --- a/datadog.gemspec +++ b/datadog.gemspec @@ -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 remove 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', diff --git a/lib-injection/host_inject_main.rb b/lib-injection/host_inject_main.rb index dca4eb5b4af..aa4d8812efe 100644 --- a/lib-injection/host_inject_main.rb +++ b/lib-injection/host_inject_main.rb @@ -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 diff --git a/spec/datadog/release_gem_spec.rb b/spec/datadog/release_gem_spec.rb index 58e954a7ca4..7ef3dd6f32a 100644 --- a/spec/datadog/release_gem_spec.rb +++ b/spec/datadog/release_gem_spec.rb @@ -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