leptris 1.9.390.1-arm-linux → 1.9.390.3-arm-linux

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: bcf2a6a065a3289ad869c0eb9978f8258622bb28f8027bb3d3001ddef4e9f061
4
- data.tar.gz: d65891f62169d3244fcce4763487740de177abef8b194bac8ead02914ef81a6e
3
+ metadata.gz: 0b09467921c87cfe05c15975216fbc11c56bbe6e82652f0bfb29423d7c0486e0
4
+ data.tar.gz: f20ae61a8096d935d2a436c553b1b236e7dce5509da3dc1e52a13f2dd536a997
5
5
  SHA512:
6
- metadata.gz: d3b66feeb16aa149b33d5487efb14c04daf76bf14b365ebbfcf76ac8b0b48a561b3347a5151e449c3d47d28d194aa6647ac86924ef5bd664d7a5a1dc2d461b73
7
- data.tar.gz: 17a34b6ee5a880a07e8e1848801d2702ba44a8a5926a20d7b99613cff07945aa02ee6e94d6ad238a81639cf661d0ae0c4ef7a195f2de436c41a7c3fbabc9a955
6
+ metadata.gz: c602ce98908089045246e5f97d66c787a546e08d6f2da8a4a118b43b3f756a13a277aca9fbc470e1b83f2847fe2c9a8d17620fb3530dac98314924586a9041b1
7
+ data.tar.gz: 44db56dc296a414f9fb6e2a64650de3b392125a4b5fd5e94dcc6950b7612648aa2ccf45073e7b5b1e177aaca6fdc0a51a243f07343f189a203ed136fc1b1866a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ### Fixed
4
+
5
+ - Rebuild the native object under the Ruby that performs final packaging.
6
+ Restoring the job Ruby after the per-minor release loop could reuse the
7
+ last minor's object and overwrite the job minor's bundle with a different
8
+ Ruby header ABI. The packaging regression now exercises the same workspace
9
+ under Ruby 3.4, then 4.0, then 3.3 and checks the actual packaged native/GC paths.
10
+
11
+ ### Added — 1.9.390.2 (namespace snapshot face)
12
+
13
+ - **Element#namespace_declarations_snapshot (leptris-ruby#565).**
14
+ The engine's bulk in-scope declaration snapshot (libleptris 1.9.388)
15
+ as {path:, prefix:, href:} rows — one engine call replaces the
16
+ per-node namespace_definitions union walk (lutaml-model#1018's
17
+ largest ours-side site). Soft-attached + respond_to?-probed per the
18
+ soft-attach law; parity-pinned against the per-node walk in specs.
19
+
20
+
3
21
  ### Added — 1.9.390.1 (prebuilt-matrix ride)
4
22
 
5
23
  - **Ruby 4.0 native bundles ship in the platform gems (#563, #554).**
data/Rakefile CHANGED
@@ -290,7 +290,9 @@ task :compile do
290
290
  elsif %w[ruby truffleruby].include?(RUBY_ENGINE)
291
291
  ext_dir = "ext/leptris/native"
292
292
  Dir.chdir(ext_dir) do
293
- sh "ruby extconf.rb"
293
+ # Packaging restores the job Ruby after the per-minor release loop.
294
+ # Rebuild even when native.o is newer: it may use another Ruby's headers.
295
+ sh RbConfig.ruby, "extconf.rb"
294
296
  if RUBY_PLATFORM =~ /darwin/
295
297
  # Link the bundle ourselves: mkmf snapshots LIBRUBYARG from
296
298
  # RbConfig at require time, so setup-ruby's shared-libruby
@@ -300,18 +302,18 @@ task :compile do
300
302
  # Makefile, link with pure -undefined dynamic_lookup (Ruby
301
303
  # symbols resolve from the loading interpreter) and a
302
304
  # conservative deployment target.
303
- sh "make native.o"
305
+ sh "make -B native.o"
304
306
  sh "cc -dynamic -bundle -undefined dynamic_lookup " \
305
307
  "-mmacosx-version-min=#{ENV['MACOSX_DEPLOYMENT_TARGET'] || '11.0'} " \
306
308
  "-o native.bundle native.o"
307
309
  else
308
310
  # #207: the darwin contract on Linux too — mkmf's `make`
309
311
  # linked libruby.so.3.3 (plus a runner runpath), which
310
- # failed to load on 3.4/4.0. Link WITHOUT libruby: one
311
- # .so serves every Ruby minor; rb_* resolve from the
312
- # loading interpreter at dlopen (static rubies export
312
+ # failed to load on 3.4/4.0. Link WITHOUT libruby while
313
+ # keeping the building Ruby's header ABI: rb_* resolve from
314
+ # the loading interpreter at dlopen (static rubies export
313
315
  # their symbols via -rdynamic, like any extension .so).
314
- sh "make native.o"
316
+ sh "make -B native.o"
315
317
  sh "#{RbConfig::CONFIG['CC']} -shared -fPIC -o native.so native.o"
316
318
  end
317
319
  # Guard the linkage contract at the build chokepoint (#1739):
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.390.1"
4
+ VERSION = "1.9.390.3"
5
5
  end
@@ -1007,6 +1007,60 @@ class Leptris::XML::Element < Leptris::XML::Node
1007
1007
  result
1008
1008
  end
1009
1009
 
1010
+ # libleptris 1.9.388 (leptris#1874): the bulk in-scope namespace
1011
+ # declaration snapshot — every (element, declaration) row under
1012
+ # this element in document order, one engine call. Rows are
1013
+ # {path:, prefix:, href:} with path an ancestor-first name array
1014
+ # (empty for self) — the exact shape lutaml-model#1054's
1015
+ # plan-hydrator contract consumes. Defined only when the native
1016
+ # face attached (the soft attach above); consumers probe with
1017
+ # respond_to?.
1018
+ if Leptris::XML::FFI.respond_to?(
1019
+ :leptris_element_namespace_declarations_snapshot,
1020
+ )
1021
+ def namespace_declarations_snapshot
1022
+ ensure_alive!
1023
+ fn = Leptris::XML::FFI
1024
+ out_count = ::FFI::MemoryPointer.new(:size_t)
1025
+ out_blob = ::FFI::MemoryPointer.new(:size_t)
1026
+ rc = fn.leptris_element_namespace_declarations_snapshot(
1027
+ c_ptr, nil, 0, out_count, nil, 0, out_blob,
1028
+ )
1029
+ return [] unless rc.zero?
1030
+
1031
+ rows_cap = out_count.read(:size_t)
1032
+ blob_cap = out_blob.read(:size_t)
1033
+ return [] if rows_cap.zero?
1034
+
1035
+ stride = 7 * ::FFI.type_size(:uint32)
1036
+ rows = ::FFI::MemoryPointer.new(stride * rows_cap)
1037
+ blob = ::FFI::MemoryPointer.new(blob_cap)
1038
+ rc = fn.leptris_element_namespace_declarations_snapshot(
1039
+ c_ptr, rows, rows_cap, out_count, blob, blob_cap, out_blob,
1040
+ )
1041
+ return [] if rc != 0
1042
+
1043
+ u32s = rows.read_array_of_uint32(7 * rows_cap)
1044
+ (0...rows_cap).map do |i|
1045
+ depth, _name_count, names_off, prefix_off, prefix_len,
1046
+ href_off, href_len = u32s.slice(i * 7, 7)
1047
+ path = depth.times.map do |k|
1048
+ name_ptr = blob + names_off
1049
+ s = name_ptr.get_string(0)
1050
+ names_off += s.bytesize + 1
1051
+ s
1052
+ end
1053
+ prefix = if prefix_off == 0xFFFF_FFFF
1054
+ nil
1055
+ else
1056
+ (blob + prefix_off).get_string(0, prefix_len)
1057
+ end
1058
+ href = (blob + href_off).get_string(0, href_len)
1059
+ { path: path, prefix: prefix, href: href }
1060
+ end
1061
+ end
1062
+ end
1063
+
1010
1064
  def namespaces
1011
1065
  return @namespaces if memo_hit?(@namespaces_version)
1012
1066
  scopes = {}
@@ -453,6 +453,18 @@ module Leptris
453
453
  nil
454
454
  end
455
455
 
456
+ # libleptris 1.9.388 (leptris#1874/#1884): the bulk in-scope
457
+ # namespace-declaration snapshot — one call replaces the
458
+ # per-node namespace_definitions union walk (lutaml-model#1018).
459
+ # SOFT attach — engines before 1.9.388 lack the symbol.
460
+ begin
461
+ attach_function :leptris_element_namespace_declarations_snapshot,
462
+ [:leptris_element, :pointer, :size_t, :pointer,
463
+ :pointer, :size_t, :pointer], :size_t
464
+ rescue ::FFI::NotFoundError
465
+ nil
466
+ end
467
+
456
468
  # libleptris 1.9.312 (#1551): serialize a walk result back
457
469
  # to XML guided by its plan — the plan supplies element
458
470
  # wrappers (row wire_name + ns_prefix), the result the
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.390.1
4
+ version: 1.9.390.3
5
5
  platform: arm-linux
6
6
  authors:
7
7
  - Ribose Inc.