yeptris 0.6.7.1-aarch64-linux → 0.6.7.2-aarch64-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: 2698d9b9eb57a88b828e8a395bcd51fa7037c3fa16bb056348f2c507abfad68b
4
- data.tar.gz: '08c7947f3a5bc0c1878aee5fc6cb3565be31f55b2f43d3ea165a50adac0b384e'
3
+ metadata.gz: 5808e888f2a7d162b54d9cf24dbe04bdbf4240a72bbb49b6cc284b8c50181c42
4
+ data.tar.gz: 1f60bcf33e07a44cc681d94476e402ad2d015b0e64ab97a26f183e14ab62182b
5
5
  SHA512:
6
- metadata.gz: 27e37a028e8af437ff1057aa18b1ae5d99466ede0cf1f2507f91b97be15404f4c51153fdce77b79b09aab77a5aa62a8c79e1872ef4d3a7bdce623a67d71b0314
7
- data.tar.gz: a01384b2cc548e1f488bd4f2f0c805a27b434b4aa42ee56596d83e690a792a4a3e5f2d9225464291b558ab57288d8cf3aaf46dfce491160b022dce4f9df561e0
6
+ metadata.gz: ffe55588742ce4fe39f38db1217dae9a779f3b659d13975b71d26f9208ea0e4a21f332b35baa46c4241766800ee062897cf8b6bf4e903f7c253f31d7c72cff5e
7
+ data.tar.gz: 6a47853f1d74133525df2165f9f95a9debb0631fcd4826753e107373425ae12ed75b95f41f45f3c0f9981a25a79d03c95b2685cab1b4c1b5643bf8520f60c9bb
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Builds the vendored libyeptris at gem-install time so EVERY install
4
+ # carries the engine (the pure `ruby`-platform gem has no prebuilt
5
+ # binary). Platform gems vendor the prebuilt lib at the gem root —
6
+ # when one is present this extension no-ops.
7
+
8
+ require "mkmf"
9
+ require "fileutils"
10
+
11
+ gem_root = File.expand_path("../..", __dir__)
12
+ vendored = File.join(gem_root, "vendor", "libyeptris")
13
+
14
+ prebuilt = ["libyeptris.so", "libyeptris.dylib", "libyeptris.dll",
15
+ "yeptris.dll"].any? { |n| File.exist?(File.join(gem_root, n)) }
16
+
17
+ def write_dummy_makefile(reason)
18
+ File.write("Makefile", <<~MAKE)
19
+ all:
20
+ \t@echo "#{reason}"
21
+ install:
22
+ clean:
23
+ MAKE
24
+ end
25
+
26
+ if prebuilt
27
+ write_dummy_makefile("yeptris: prebuilt libyeptris ships in this gem; source build skipped")
28
+ elsif !File.directory?(vendored)
29
+ write_dummy_makefile("yeptris: no vendored libyeptris sources; set YEPTRIS_LIB_PATH at require time")
30
+ elsif find_executable("cmake").nil?
31
+ write_dummy_makefile("yeptris: cmake not found; set YEPTRIS_LIB_PATH at require time")
32
+ else
33
+ # Out-of-source into the ext workdir; the shared lib then moves to
34
+ # the GEM ROOT, where ffi.rb's ladder probes it.
35
+ build = File.join(Dir.pwd, "libyeptris-build")
36
+ # BUILD_TESTING (the CMake standard) gates test/ — the vendored
37
+ # tree ships no test dir; the static target must build because the
38
+ # unconditional install(TARGETS yeptris_static) expects it
39
+ args = [
40
+ "-DCMAKE_BUILD_TYPE=Release",
41
+ "-DBUILD_TESTING=OFF",
42
+ "-DYEPTRIS_BUILD_CLI=OFF",
43
+ "-DYEPTRIS_BUILD_BENCHMARKS=OFF",
44
+ "-DYEPTRIS_BUILD_SHARED=ON",
45
+ ]
46
+ ok = system("cmake", "-S", vendored, "-B", build, *args) &&
47
+ system("cmake", "--build", build, "--config", "Release")
48
+ lib = Dir.glob(File.join(build, "**", "libyeptris.{so,dylib}")).first
49
+ if ok && lib
50
+ FileUtils.cp(lib, File.join(gem_root, File.basename(lib)))
51
+ write_dummy_makefile("yeptris: built vendored libyeptris at gem install")
52
+ else
53
+ # a failed build must not abort the install — require-time raises
54
+ # the informative ladder error instead
55
+ write_dummy_makefile("yeptris: libyeptris source build failed; set YEPTRIS_LIB_PATH at require time")
56
+ end
57
+ end
data/lib/yeptris.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Yeptris
4
4
  # The gem's version lives in the parent namespace's file — the last
5
5
  # internal require (yeptris/version) retired with it.
6
- VERSION = "0.6.7.1".freeze
6
+ VERSION = "0.6.7.2".freeze
7
7
  # The error hierarchy lives in THIS file (the parent namespace's
8
8
  # own file): nested constants do not trigger a parent-constant
9
9
  # autoload, and the law forbids internal requires — defining the
@@ -95,16 +95,18 @@ end
95
95
  # DLL per supported minor ships and RUBY_VERSION selects. A missing
96
96
  # cell (Ruby 3.3 arm64 has no build) falls back LOUDLY to the ladder.
97
97
  begin
98
- if Gem.win_platform?
99
- require "yeptris/native-#{RUBY_VERSION[/\A\d+\.\d+/]}"
100
- else
98
+ # per-minor FIRST everywhere: a single version-agnostic native.so
99
+ # loads under ANY Ruby (symbols resolve from the host process), and
100
+ # one built for a different minor is an ABI gamble — Ruby 3.0 ran
101
+ # a 3.3-built ext and the JSON parse failed. The plain name stays
102
+ # as the dev-checkout fallback (built for the running Ruby).
103
+ require "yeptris/native-#{RUBY_VERSION[/\A\d+\.\d+/]}"
104
+ rescue LoadError
105
+ begin
101
106
  require "yeptris/native"
102
- end
103
- rescue LoadError => e
104
- if Gem.win_platform?
107
+ rescue LoadError => e
105
108
  warn "yeptris: no precompiled native materializer for Ruby " \
106
109
  "#{RUBY_VERSION[/\A\d+\.\d+/]} on this platform " \
107
110
  "(#{e.message}); the FFI ladder carries the load"
108
111
  end
109
- # FFI ladder only
110
112
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7.1
4
+ version: 0.6.7.2
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Ribose Inc.
@@ -30,11 +30,13 @@ description: A Ruby YAML library over libyeptris — Psych-compatible semantics
30
30
  email:
31
31
  - open.source@ribose.com
32
32
  executables: []
33
- extensions: []
33
+ extensions:
34
+ - ext/libyeptris/extconf.rb
34
35
  extra_rdoc_files: []
35
36
  files:
36
37
  - README.adoc
37
38
  - ext/build_windows_native.rb
39
+ - ext/libyeptris/extconf.rb
38
40
  - ext/yeptris_native/extconf.rb
39
41
  - ext/yeptris_native/json_ruby.c
40
42
  - ext/yeptris_native/yeptris_native.c
@@ -44,7 +46,7 @@ files:
44
46
  - lib/yeptris/json.rb
45
47
  - lib/yeptris/json/descriptor.rb
46
48
  - lib/yeptris/materializer.rb
47
- - lib/yeptris/native.so
49
+ - lib/yeptris/native-3.3.so
48
50
  - lib/yeptris/node.rb
49
51
  - lib/yeptris/psych.rb
50
52
  - lib/yeptris/psych/coder_shim.rb
File without changes