trailblazer-activity 0.16.3 → 0.16.4

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: d337611d8f737a90f05b16ad72442808bb373351ff81ae908fde441492fe72f2
4
- data.tar.gz: 705b4f0de152cf24b0be9dead73aa2cde4f59cce80548a4a44737b061be76e3a
3
+ metadata.gz: ba8b06193c7e9d3a488e76880cf82906db733edfa081c8de86f8ae55a3392628
4
+ data.tar.gz: efa7751c90679572bd39fb1c1ea18c75a996de796cba685819fb256ef6c738d7
5
5
  SHA512:
6
- metadata.gz: 77173535922167fbc51c4bcc92909dea8e263313d97ef7ce47716ddbadc0a82ece0d511deccb57badc1adecb61fe2276594cf561642931da9cc243c2960fd9b7
7
- data.tar.gz: e2157a80cbfdea6cc573bec8bdbb1933667e17335229aa9690051b3cb34bd0adb4613991621332debde5b34cb00993e9595169d154c8861db8857313deba4d66
6
+ metadata.gz: 0b506af8a0f22329757b03ce8a186e552cae4e747780690cd910555453d1e16ba6c897eb0d5b7266c1ca730e82ab2c0684a4c42700a8f16bdde5927491bb2f6a
7
+ data.tar.gz: c448cc3fb03f2b6abd5da7d9f54ddebc4a17327923412da8f96d88a698fc0d0e2d72172f510a1d765fa6ff6c770e2f20f9db12db59bc991631882238182bb958
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.16.4
2
+
3
+ * Revert the static "fix" from 0.16.3 and make the compaction fix optional, as most Ruby versions
4
+ are solving this problem natively. See here for details: https://dev.to/trailblazer/gc-compaction-behold-your-hash-keys-2ii1#quick-fix
5
+
1
6
  # 0.16.3
2
7
 
3
8
  * Fix a bug in Ruby 3.2: `NoMethodError: undefined method `[]' for nil`. Thanks @tiagotex for finding the problem
data/Gemfile CHANGED
@@ -3,3 +3,5 @@ gemspec
3
3
 
4
4
  # gem "trailblazer-developer", path: "../trailblazer-developer"
5
5
  # gem "benchmark-ips"
6
+ # gem "trailblazer-core-utils", path: "../trailblazer-core-utils"
7
+ # gem "trailblazer-core-utils", github: "trailblazer/trailblazer-core-utils"
@@ -0,0 +1,28 @@
1
+ module Trailblazer
2
+ class Activity
3
+ # TODO: we can remove this once we drop Ruby <= 3.3.6.
4
+ class Circuit
5
+ # This is a hot fix for Ruby versions that haven't fixed the GC compaction bug:
6
+ # https://redmine.ruby-lang.org/issues/20853
7
+ # https://bugs.ruby-lang.org/issues/20868
8
+ #
9
+ # Affected versions might be: 3.1.x, 3.2.?????????, 3.3.0-3.3.6
10
+ # You don't need this fix in the following versions:
11
+ #
12
+ # If you experience this bug: https://github.com/trailblazer/trailblazer-activity/issues/60
13
+ #
14
+ # NoMethodError: undefined method `[]' for nil
15
+ #
16
+ # you need to do
17
+ #
18
+ # Trailblazer::Activity::Circuit.include(RubyWithUnfixedCompaction)
19
+ module RubyWithUnfixedCompaction
20
+ def initialize(wiring, *args, **options)
21
+ wiring.compare_by_identity
22
+
23
+ super(wiring, *args, **options)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -24,7 +24,7 @@ module Trailblazer
24
24
 
25
25
  # From the intermediate "template" and the actual implementation, compile a {Circuit} instance.
26
26
  def schema_components(intermediate, implementation, config)
27
- wiring = {}.compare_by_identity # https://ruby-doc.org/3.3.0/Hash.html#class-Hash-label-Modifying+an+Active+Hash+Key
27
+ wiring = {}
28
28
  nodes_attributes = []
29
29
 
30
30
  intermediate.wiring.each do |task_ref, outs|
@@ -1,7 +1,7 @@
1
1
  module Trailblazer
2
2
  module Version
3
3
  module Activity
4
- VERSION = "0.16.3"
4
+ VERSION = "0.16.4"
5
5
  end
6
6
  end
7
7
  end
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "minitest", "~> 5.0"
25
25
  spec.add_development_dependency "minitest-line"
26
26
  spec.add_development_dependency "rake"
27
+ spec.add_development_dependency "trailblazer-core-utils", "0.0.3"
27
28
 
28
29
  spec.required_ruby_version = '>= 2.1.0'
29
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.3
4
+ version: 0.16.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-08 00:00:00.000000000 Z
11
+ date: 2024-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer-context
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: trailblazer-core-utils
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 0.0.3
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 0.0.3
97
111
  description:
98
112
  email:
99
113
  - apotonick@gmail.com
@@ -114,6 +128,7 @@ files:
114
128
  - lib/trailblazer/activity.rb
115
129
  - lib/trailblazer/activity/adds.rb
116
130
  - lib/trailblazer/activity/circuit.rb
131
+ - lib/trailblazer/activity/circuit/ruby_with_unfixed_compaction.rb
117
132
  - lib/trailblazer/activity/circuit/task_adapter.rb
118
133
  - lib/trailblazer/activity/deprecate.rb
119
134
  - lib/trailblazer/activity/introspect.rb