leptris 1.9.174.1 → 1.9.174.2
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 +4 -4
- data/CHANGELOG.md +14 -0
- data/Rakefile +12 -9
- data/ext/build_windows_native.rb +38 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/native_layer.rb +11 -5
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb172d69b816cff764e249cd5708a2394e7e4886a5c5281bf69160f876550c20
|
|
4
|
+
data.tar.gz: 22ff15b7a5dbaee59a9643f150662321e6f52267cb96b47c6621e73957615f46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d86e101b19a89c87b3ff67fc6fae563da827d3b389618fbada51cb9bcd387e772b474315e4d3d9f21bd6dd4bb1429df5b5f1de624787fc02db889dd6b1dc6efc
|
|
7
|
+
data.tar.gz: c20c6f8446a7aef0b0d08c672deccf1d5aaa7653fe04e8f69c6a8a1b0f641f6bb5221d44f0c28f0cabcfb901ce2762ce5eed3ed6fa427b2231935bda1c6bd9b9
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,20 @@ All notable changes to Leptris will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.9.174.2] - 2026-09-15
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **The native layer returns to Windows, one DLL per Ruby minor
|
|
13
|
+
(#227)**: a PE DLL must bind its build Ruby's runtime, so the
|
|
14
|
+
Windows platform gems now ship `native-3.3.so` / `native-3.4.so`
|
|
15
|
+
/ `native-4.0.so` and the loader picks by `RUBY_VERSION` at
|
|
16
|
+
require. The release workflow compiles each minor's artifact on
|
|
17
|
+
the Windows legs (a minor unavailable on a runner degrades to
|
|
18
|
+
the loud FFI fallback for that cell); local `rake compile` on
|
|
19
|
+
Windows builds the current minor's DLL. Windows test legs now
|
|
20
|
+
exercise the full native suite instead of FFI-only.
|
|
21
|
+
|
|
8
22
|
## [1.9.174.1] - 2026-09-15
|
|
9
23
|
|
|
10
24
|
### Fixed
|
data/Rakefile
CHANGED
|
@@ -128,12 +128,14 @@ task :compile do
|
|
|
128
128
|
# the library — no compile at install; resolves libleptris at
|
|
129
129
|
# require time via dlsym.
|
|
130
130
|
if Gem.win_platform?
|
|
131
|
-
# #207: a PE DLL cannot leave Ruby imports unresolved —
|
|
132
|
-
#
|
|
133
|
-
#
|
|
134
|
-
#
|
|
135
|
-
#
|
|
136
|
-
|
|
131
|
+
# #207: a PE DLL cannot leave Ruby imports unresolved — it
|
|
132
|
+
# binds the build Ruby's x64-ucrt-rubyNNN.dll. The Windows
|
|
133
|
+
# gems therefore ship one DLL per supported Ruby minor
|
|
134
|
+
# (native-<minor>.so), and native_layer picks by RUBY_VERSION
|
|
135
|
+
# (#227). Local compile builds just the current minor's DLL;
|
|
136
|
+
# the release workflow runs the build script under 3.3/3.4/
|
|
137
|
+
# 4.0 to produce the full set.
|
|
138
|
+
sh "#{RbConfig.ruby} ext/build_windows_native.rb"
|
|
137
139
|
else
|
|
138
140
|
ext_dir = "ext/leptris/native"
|
|
139
141
|
Dir.chdir(ext_dir) do
|
|
@@ -283,9 +285,10 @@ platforms.each do |platform|
|
|
|
283
285
|
spec.platform = Gem::Platform.new(platform)
|
|
284
286
|
spec.files += Dir.glob("lib/libleptris.{dll,so,dylib}")
|
|
285
287
|
spec.files += Dir.glob("lib/{libutf8proc.3.dylib,libutf8proc.so.3,libutf8proc.so,utf8proc.dll}")
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
288
|
+
if platform.include?("mingw")
|
|
289
|
+
# #207/#227: per-Ruby-minor DLLs (PE must bind its Ruby).
|
|
290
|
+
spec.files += Dir.glob("lib/leptris/xml/native-*.so")
|
|
291
|
+
else
|
|
289
292
|
spec.files += Dir.glob("lib/leptris/xml/native.{bundle,so,dll}")
|
|
290
293
|
end
|
|
291
294
|
task = Gem::PackageTask.new(spec)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Builds the native read layer DLL for the CURRENT Ruby and
|
|
4
|
+
# installs it under its minor-versioned name
|
|
5
|
+
# (lib/leptris/xml/native-<major.minor>.so).
|
|
6
|
+
#
|
|
7
|
+
# #207/#227: a PE DLL cannot resolve Ruby imports lazily — it
|
|
8
|
+
# must bind the build Ruby's x64-ucrt-rubyNNN.dll. One DLL per
|
|
9
|
+
# supported minor therefore ships in the Windows platform gems,
|
|
10
|
+
# and native_layer picks by RUBY_VERSION at require.
|
|
11
|
+
#
|
|
12
|
+
# Standalone by design: the release workflow runs this under each
|
|
13
|
+
# Ruby minor (3.3/3.4/4.0) with no bundler context.
|
|
14
|
+
|
|
15
|
+
require "rbconfig"
|
|
16
|
+
require "fileutils"
|
|
17
|
+
|
|
18
|
+
root = File.expand_path("..", __dir__)
|
|
19
|
+
ext_dir = File.join(root, "ext", "leptris", "native")
|
|
20
|
+
minor = RUBY_VERSION[/\A\d+\.\d+/]
|
|
21
|
+
|
|
22
|
+
Dir.chdir(ext_dir) do
|
|
23
|
+
system(RbConfig.ruby, "extconf.rb") or abort "extconf failed under #{RUBY_VERSION}"
|
|
24
|
+
# mkmf's link binds the CURRENT Ruby's runtime DLL — exactly
|
|
25
|
+
# what the versioned naming is for.
|
|
26
|
+
success = system("make")
|
|
27
|
+
abort "make failed under #{RUBY_VERSION}" unless success
|
|
28
|
+
so = Dir.glob("native.{so,dll}").first
|
|
29
|
+
abort "native bundle not produced under #{RUBY_VERSION}" unless so
|
|
30
|
+
dest = File.join(root, "lib", "leptris", "xml", "native-#{minor}.so")
|
|
31
|
+
# The artifact must reference only this minor's Ruby DLL.
|
|
32
|
+
imported = `strings #{so} 2>/dev/null`[/[a-z0-9-]*ruby\d{3,}\.dll/i]
|
|
33
|
+
if imported && !imported.include?("ruby#{minor.delete('.')}")
|
|
34
|
+
abort "#{so} imports #{imported} but was built under #{RUBY_VERSION} — refuse to mis-name it"
|
|
35
|
+
end
|
|
36
|
+
FileUtils.cp(so, dest)
|
|
37
|
+
puts "Installed native layer for Ruby #{minor} -> #{dest} (#{imported || 'no ruby dll string found'})"
|
|
38
|
+
end
|
data/lib/leptris/version.rb
CHANGED
|
@@ -17,11 +17,17 @@
|
|
|
17
17
|
require "ffi" unless defined?(::FFI::Library)
|
|
18
18
|
|
|
19
19
|
begin
|
|
20
|
-
# The compiled bundle
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
|
|
20
|
+
# The compiled bundle. A sanctioned require exception: a
|
|
21
|
+
# .bundle/.so cannot go through autoload. Missing in installs
|
|
22
|
+
# that do not vendor it (ruby-platform gem). Windows names the
|
|
23
|
+
# artifact per Ruby minor (#207/#227): a PE DLL must bind its
|
|
24
|
+
# build Ruby's runtime, so one DLL per supported minor ships
|
|
25
|
+
# and RUBY_VERSION selects.
|
|
26
|
+
if Gem.win_platform?
|
|
27
|
+
require "leptris/xml/native-#{RUBY_VERSION[/\A\d+\.\d+/]}"
|
|
28
|
+
else
|
|
29
|
+
require "leptris/xml/native"
|
|
30
|
+
end
|
|
25
31
|
rescue LoadError => e
|
|
26
32
|
raise LoadError, <<~MSG
|
|
27
33
|
leptris: the compiled native read layer is not available in
|
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.174.
|
|
4
|
+
version: 1.9.174.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -115,6 +115,7 @@ files:
|
|
|
115
115
|
- docs/adr/0004-lifetime-guard.md
|
|
116
116
|
- docs/adr/0005-autoload-manifest-ordering.md
|
|
117
117
|
- docs/adr/0006-ruby-variant-policy.md
|
|
118
|
+
- ext/build_windows_native.rb
|
|
118
119
|
- ext/leptris/native/extconf.rb
|
|
119
120
|
- ext/leptris/native/native.c
|
|
120
121
|
- leptris.gemspec
|