ddtrace 0.54.0 → 0.54.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98fd0b93fb5cc2fbca0156ea0ef37ae12936ccc2718538b61fb2c04d07f26896
4
- data.tar.gz: a64b9a3977f32c7b6417b411bf5ebd1648085bc2fdc4ba7adeffa95de590bace
3
+ metadata.gz: bef2da14245890c8187ebffd9cce972da89a177a806c6991f2e3050e1de62bc3
4
+ data.tar.gz: d37dcaf645e16177c6f7a3dd77628f2e5a4920c45fca8e3f78665c34a4d76db2
5
5
  SHA512:
6
- metadata.gz: 67e2065aa016d1fc18b4a2d193379173a78e6c3fcf47e1f74f45fa096e26feda6f6f1b5da286051730abbe9b6b5331ceb62d48ff09af9ab932bc8b97c8b3efd2
7
- data.tar.gz: dcde2f41ef22a3a2b2ab48038cd61021d63848cdfaea4aa535290447e81648a73fd0f9640b39be041273d6aa1fb3829e2a4781d39976398cf4b3f9f1826a41b1
6
+ metadata.gz: c59d7c5b2f363eb96f78ad602489ccbd0ed94ae9d6e856c70272ddb21ba467255179814db1831518789b7c32e9ab5d0f13421dd67ea585d0b39fe78849bcfe81
7
+ data.tar.gz: 97dcba8ee6eda7c3cafdb39946863d337ef67843ac7f071890ce6253786b9d9a26ca8a9f181a8c0dad44c01a3ffab53c146ea4848b6497552d26558f9f1278ce
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.54.1] - 2021-11-30
6
+
7
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.54.1
8
+
9
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.54.0...v0.54.1
10
+
11
+ ### Fixed
12
+
13
+ - Skip building profiling native extension when Ruby has been compiled without JIT ([#1774][], [#1776][])
14
+
5
15
  ## [0.54.0] - 2021-11-17
6
16
 
7
17
  Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.54.0
@@ -2670,6 +2680,8 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
2670
2680
  [#1769]: https://github.com/DataDog/dd-trace-rb/issues/1769
2671
2681
  [#1770]: https://github.com/DataDog/dd-trace-rb/issues/1770
2672
2682
  [#1771]: https://github.com/DataDog/dd-trace-rb/issues/1771
2683
+ [#1774]: https://github.com/DataDog/dd-trace-rb/issues/1774
2684
+ [#1776]: https://github.com/DataDog/dd-trace-rb/issues/1776
2673
2685
  [@AdrianLC]: https://github.com/AdrianLC
2674
2686
  [@Azure7111]: https://github.com/Azure7111
2675
2687
  [@BabyGroot]: https://github.com/BabyGroot
@@ -1,23 +1,57 @@
1
1
  # typed: ignore
2
2
 
3
- def skip_building_extension?
3
+ # Older Rubies don't have the MJIT header, used by the JIT compiler, so we need to use a different approach
4
+ CAN_USE_MJIT_HEADER = RUBY_VERSION >= '2.6'
5
+
6
+ def on_jruby?
4
7
  # We don't support JRuby for profiling, and JRuby doesn't support native extensions, so let's just skip this entire
5
8
  # thing so that JRuby users of dd-trace-rb aren't impacted.
6
- on_jruby = RUBY_ENGINE == 'jruby'
9
+ RUBY_ENGINE == 'jruby'
10
+ end
7
11
 
12
+ def on_truffleruby?
8
13
  # We don't officially support TruffleRuby for dd-trace-rb at all BUT let's not break adventurous customers that
9
14
  # want to give it a try.
10
- on_truffleruby = RUBY_ENGINE == 'truffleruby'
15
+ RUBY_ENGINE == 'truffleruby'
16
+ end
11
17
 
18
+ def on_windows?
12
19
  # Microsoft Windows is unsupported, so let's not build the extension there.
13
- on_windows = Gem.win_platform?
20
+ Gem.win_platform?
21
+ end
22
+
23
+ def expected_to_use_mjit_but_mjit_is_disabled?
24
+ # On some Rubies, we require the mjit header to be present. If Ruby was installed without MJIT support, we also skip
25
+ # building the extension.
26
+ mjit_disabled = CAN_USE_MJIT_HEADER && RbConfig::CONFIG['MJIT_SUPPORT'] != 'yes'
27
+
28
+ if mjit_disabled
29
+ # rubocop:disable Style/StderrPuts
30
+ $stderr.puts(%(
31
+ +------------------------------------------------------------------------------+
32
+ | Your Ruby has been compiled without JIT support (--disable-jit-support). |
33
+ | The profiling native extension requires a Ruby compiled with JIT support, |
34
+ | even if the JIT is not in use by the application itself. |
35
+ | |
36
+ | WARNING: Without the profiling native extension, some profiling features |
37
+ | will not be available. |
38
+ +------------------------------------------------------------------------------+
39
+
40
+ ))
41
+ end
42
+
43
+ mjit_disabled
44
+ end
14
45
 
46
+ def disabled_via_env?
15
47
  # Experimental toggle to disable building the extension.
16
48
  # Disabling the extension will lead to the profiler not working in future releases.
17
49
  # If you needed to use this, please tell us why on <https://github.com/DataDog/dd-trace-rb/issues/new>.
18
- disabled_via_env = ENV['DD_PROFILING_NO_EXTENSION'].to_s.downcase == 'true'
50
+ ENV['DD_PROFILING_NO_EXTENSION'].to_s.downcase == 'true'
51
+ end
19
52
 
20
- on_jruby || on_truffleruby || on_windows || disabled_via_env
53
+ def skip_building_extension?
54
+ disabled_via_env? || on_jruby? || on_truffleruby? || on_windows? || expected_to_use_mjit_but_mjit_is_disabled?
21
55
  end
22
56
 
23
57
  # IMPORTANT: When adding flags, remember that our customers compile with a wide range of gcc/clang versions, so
@@ -27,7 +61,6 @@ def add_compiler_flag(flag)
27
61
  end
28
62
 
29
63
  if skip_building_extension?
30
- # rubocop:disable Style/StderrPuts
31
64
  $stderr.puts(%(
32
65
  +------------------------------------------------------------------------------+
33
66
  | Skipping build of profiling native extension and replacing it with a no-op |
@@ -84,9 +117,6 @@ if RUBY_PLATFORM.include?('linux')
84
117
  $defs << '-DHAVE_PTHREAD_GETCPUCLOCKID'
85
118
  end
86
119
 
87
- # Older Rubies don't have the MJIT header, used by the JIT compiler, so we need to use a different approach
88
- CAN_USE_MJIT_HEADER = RUBY_VERSION >= '2.6'
89
-
90
120
  # Tag the native extension library with the Ruby version and Ruby platform.
91
121
  # This makes it easier for development (avoids "oops I forgot to rebuild when I switched my Ruby") and ensures that
92
122
  # the wrong library is never loaded.
@@ -3,7 +3,7 @@ module Datadog
3
3
  module VERSION
4
4
  MAJOR = 0
5
5
  MINOR = 54
6
- PATCH = 0
6
+ PATCH = 1
7
7
  PRE = nil
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddtrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.54.0
4
+ version: 0.54.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-18 00:00:00.000000000 Z
11
+ date: 2021-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack