kettle-jem 7.1.41 → 7.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f44a87b5964c590bf6eb74a9da0ae7900cac81230aea488043d27668c4339cee
4
- data.tar.gz: 350675e9ec0c38f3104318288598c7bfc814c1a36c290ed1cb31ace8fd55093f
3
+ metadata.gz: 774ab005c760740284caae836c23a5962d65a2687d9cda7d870a1ac5399af4d6
4
+ data.tar.gz: 2fbeccdec4f1bd716dfe46d652ac0d52141ae2dc067458e55200860c09488838
5
5
  SHA512:
6
- metadata.gz: 3b30a4785a25f30cff74549eb28b0c1ccc716d1f549572a385935f06d3191cd109df50589e48c50a401e47dcf4f4dec2715fd1b4ccfac58941ae71cf89f6ce40
7
- data.tar.gz: 1c5335c6579f99a7a993d463287b3a7ffee8bff522dc58151ac35e3ed8c8e3fa37457117adb1b8f261449edd3179efd47e4fdd53a471f165e37fe986aba1e578
6
+ metadata.gz: aa11a578eec5dfdeafcf8975ef408af3f5c219bf2ad45741d2f905c8f97975c5bca997348e634a9296210d95b2f6aebed43fffa7b172338d6d91ac132a1d0781
7
+ data.tar.gz: ce0d1f9444959142894053cd2ea7e2b09f23ddec1ecb1b46b824057944aa0465028696d455635f4fb4d940080ba5082f38b9db5cd96a3646f205e1c97a02b215
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -33,7 +33,7 @@ Please file a bug if you notice a violation of semantic versioning.
33
33
  - other (1)
34
34
 
35
35
  - [kc] kettle-jem-deps-floor: Update kettle-jem template dependency floors:
36
- - addressable (>= 2.9.0 -> >= 2.9.1)
36
+ - kettle-family (>= 1.3.36 -> >= 1.3.37)
37
37
 
38
38
  - [kc] kettle-jem-workflow-pins: Update pinned GitHub Actions in kettle-jem templates:
39
39
  - ruby/setup-ruby v1.335.0 (7f797815d8adceb1c412e7abefdd1ab4abc47a5f) -> v1.336.0 (de492cf36cbab201753d720ce4f4e336cd688c94)
@@ -44,6 +44,8 @@ Please file a bug if you notice a violation of semantic versioning.
44
44
 
45
45
  ### Fixed
46
46
 
47
+ - Template sweep no longer deletes per-Ruby-version modular gemfile variants (x_std_libs r2/r3/r3.1 libs.gemfile and the std-lib gem variants they load) while a committed version-split loader still eval_gemfile's them; gemfile sweep deletions now respect the reference closure of the loaders that remain, so only genuinely unreferenced variants are pruned.
48
+
47
49
  ### Security
48
50
 
49
51
  ## [7.1.41] - 2026-10-29
@@ -5,7 +5,7 @@ module Kettle
5
5
  # Version namespace for this gem.
6
6
  module Version
7
7
  # Current gem version.
8
- VERSION = "7.1.41"
8
+ VERSION = "7.1.42"
9
9
  end
10
10
  # Current gem version exposed at the traditional constant location.
11
11
  VERSION = Version::VERSION # Traditional Constant Location
data/lib/kettle/jem.rb CHANGED
@@ -5154,7 +5154,7 @@ module Kettle
5154
5154
  {name: "bundler-audit", source: %(gem "bundler-audit", "~> 0.9.3"\n)},
5155
5155
  {name: "kettle-dev", source: %(gem "kettle-dev", "~> 3.1", ">= 3.1.26"\n)},
5156
5156
  {name: "kettle-drift", source: %(gem "kettle-drift", "~> 1.0", ">= 1.0.19"\n)},
5157
- {name: "kettle-family", source: %(gem "kettle-family", "~> 1.3", ">= 1.3.36"\n)},
5157
+ {name: "kettle-family", source: %(gem "kettle-family", "~> 1.3", ">= 1.3.37"\n)},
5158
5158
  {name: PACKAGE_NAME, source: kettle_jem_dependency_source},
5159
5159
  {name: "kettle-test", source: %(gem "kettle-test", "~> 2.0", ">= 2.0.29"\n)},
5160
5160
  {name: "rake", source: %(gem "rake", "~> 13.0"\n)},
@@ -16162,7 +16162,7 @@ module Kettle
16162
16162
  def main_gemfile_kettle_family_gem(package_name)
16163
16163
  return "" if package_name.to_s == "kettle-family"
16164
16164
 
16165
- %(gem "kettle-family", "~> 1.3", ">= 1.3.36"\n)
16165
+ %(gem "kettle-family", "~> 1.3", ">= 1.3.37"\n)
16166
16166
  end
16167
16167
 
16168
16168
  def main_gemfile_nomono_bootstrap(package_name)
@@ -19390,9 +19390,78 @@ module Kettle
19390
19390
 
19391
19391
  {target_path: relative_path} if skip_packaged_gemfile_template?(relative_path, config)
19392
19392
  end
19393
+ gemfile_cleanups = reject_loader_referenced_gemfile_cleanups(project_root, gemfile_cleanups)
19393
19394
  (gemfile_cleanups + disabled_integration_config_cleanups(project_root, config)).sort_by { |cleanup| cleanup.fetch(:target_path) }
19394
19395
  end
19395
19396
 
19397
+ # Reference-closure guard for sweep deletions of per-Ruby-version modular
19398
+ # gemfile variants. The committed loaders (e.g. gemfiles/modular/x_std_libs.gemfile)
19399
+ # branch on RUBY_VERSION and eval_gemfile every bucket variant, so a bucket can
19400
+ # be irrelevant to the destination's minimum test Ruby while older Rubies still
19401
+ # resolve the loader's branch table to it. Observed: the 7.1.41 family sweep
19402
+ # deleted the r2/r3/r3.1 variants (plus the std-lib gem variants they load)
19403
+ # and CI's Ruby 3.3 probe hit Errno::ENOENT eval_gemfile'ing a deleted file.
19404
+ # A variant may only be deleted when no loader that itself survives the sweep
19405
+ # references it, directly or through another kept variant.
19406
+ def reject_loader_referenced_gemfile_cleanups(project_root, cleanups)
19407
+ deletable = cleanups.map { |cleanup| cleanup.fetch(:target_path).to_s }.select { |path| path.end_with?(".gemfile") }.uniq
19408
+ return cleanups if deletable.empty?
19409
+
19410
+ referenced = loader_referenced_gemfile_closure(project_root, deletable.to_set)
19411
+ return cleanups if referenced.empty?
19412
+
19413
+ cleanups.reject { |cleanup| referenced.include?(cleanup.fetch(:target_path).to_s) }
19414
+ end
19415
+
19416
+ # Every +deletable+ gemfile path under the project reachable via
19417
+ # eval_gemfile / require_relative from a gemfile that is NOT slated for
19418
+ # deletion (the loaders that remain after the sweep). Kept variants join the
19419
+ # scan, so reference chains survive whole: loader -> r3/libs.gemfile ->
19420
+ # ../../erb/r3/v5.0.gemfile. References are collected from the AST call
19421
+ # records (Prism), never from regex source scanning; branch tables inside
19422
+ # if/elsif still yield every eval_gemfile call node they contain, which is
19423
+ # exactly the closure the committed loader needs.
19424
+ def loader_referenced_gemfile_closure(project_root, deletable)
19425
+ root = File.expand_path(project_root.to_s)
19426
+ raw_prefix = "#{project_root.to_s.chomp('/')}/"
19427
+ queue = Dir.glob(File.join(root, "gemfiles/**/*.gemfile")).map { |path| path.delete_prefix("#{root}/").delete_prefix(raw_prefix) }
19428
+ main_gemfile = File.join(root, "Gemfile")
19429
+ queue << "Gemfile" if File.file?(main_gemfile)
19430
+ queue.reject! { |path| deletable.include?(path) }
19431
+
19432
+ kept = Set.new
19433
+ scanned = Set.new
19434
+ until queue.empty?
19435
+ relative = queue.pop
19436
+ next unless scanned.add?(relative)
19437
+
19438
+ absolute = File.join(root, relative)
19439
+ next unless File.file?(absolute)
19440
+
19441
+ gemfile_reference_targets(File.read(absolute), File.dirname(absolute)).each do |target|
19442
+ next unless target.start_with?("#{root}/")
19443
+
19444
+ project_relative = target.delete_prefix("#{root}/")
19445
+ next unless deletable.include?(project_relative)
19446
+ next unless kept.add?(project_relative)
19447
+
19448
+ # The referenced variant survives the sweep, so its own references
19449
+ # must survive too (iterated closure to a fixed point).
19450
+ queue << project_relative
19451
+ end
19452
+ end
19453
+ kept
19454
+ end
19455
+
19456
+ # Absolute paths targeted by eval_gemfile / require_relative calls in a
19457
+ # gemfile source. Both resolve relative to the referencing file's directory.
19458
+ def gemfile_reference_targets(content, base_dir)
19459
+ %i[eval_gemfile require_relative].flat_map { |call_name| ruby_call_records(content.to_s, call_name) }
19460
+ .filter_map { |call| ruby_string_argument(call) }
19461
+ .map { |reference| File.expand_path(reference.to_s, base_dir) }
19462
+ .uniq
19463
+ end
19464
+
19396
19465
  def shim_profile_cleanups(project_root, facts, preferences, template_selection: {})
19397
19466
  return [] unless facts[:template_profile].to_s == SHIM_TEMPLATE_PROFILE
19398
19467
  return [] unless Array(template_selection[:only]).empty?
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- �9���Ս0]t�P��O�V2Q��% |H�cC��t�W<\�'EFY�ȉ�r�*"�����r^6
2
- {�n@6���x",���Hh6�/7Qi��mFzF#��T[��Uڧ{�������A������k��Q�K���d4{��ztݏ����4!�����06�'ݩ�|�8��'br8�X#�U�zOq|��(@�F�S�k��n�FI)D�M��z�+,u����(g��ج �r=��`;8��巑R�#��
1
+ "�DGp����@t/��N<�eTe��6�"���B�!2��J�,8X����1�� %�l��ோU�D�);p|�w]���u#����py� �h�ם>7�쬥]U��^�@4Ei�5�������� ������!]�I�~U�����_Jv�D-j�K̵:�1�k#���h�������;�i����_�oB� ����j�Rט����Q�XQ�zA�$�!��YO3��V���&*_S�����@�6���7P�>���o���T�u�>�G�2�+�6`� �%�`�KUt�D{�Z�x�&t��ī��m���u���@�rq9r|8����$�ՎC�ݩ�ש��8g��Ȉ��A���ԛ��/<�YI�
2
+ ��g"��v�
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-jem
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.41
4
+ version: 7.1.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -1021,10 +1021,10 @@ licenses:
1021
1021
  - PolyForm-Small-Business-1.0.0
1022
1022
  metadata:
1023
1023
  homepage_uri: https://structuredmerge.org
1024
- source_code_uri: https://github.com/structuredmerge/structuredmerge-ruby/tree/v7.1.41
1025
- changelog_uri: https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.1.41/CHANGELOG.md
1024
+ source_code_uri: https://github.com/structuredmerge/structuredmerge-ruby/tree/v7.1.42
1025
+ changelog_uri: https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.1.42/CHANGELOG.md
1026
1026
  bug_tracker_uri: https://github.com/structuredmerge/structuredmerge-ruby/issues
1027
- documentation_uri: https://www.rubydoc.info/gems/kettle-jem/7.1.41
1027
+ documentation_uri: https://www.rubydoc.info/gems/kettle-jem/7.1.42
1028
1028
  funding_uri: https://github.com/sponsors/pboling
1029
1029
  wiki_uri: https://github.com/structuredmerge/structuredmerge-ruby/wiki
1030
1030
  news_uri: https://www.railsbling.com/tags/kettle-jem
metadata.gz.sig CHANGED
Binary file