expressir 2.4.54-x86_64-linux → 2.4.55-x86_64-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: df13a2ff73701682eeca655e798104386342e59dbbdc64a6e1e03b2000823302
4
- data.tar.gz: '072283e993dfa65025f0fe305aebfabda2b512e99b5ae5889634133e3424dc5a'
3
+ metadata.gz: 483b1c3bdc51362ef0ca59721616f9bc6d827857c5362e6ebfea6d53d52e94d1
4
+ data.tar.gz: 7b09b2ccb1d81952c44151b162c9405f414c7d1506fc782aa9dcea7e60b0c0d3
5
5
  SHA512:
6
- metadata.gz: 3d99ffc6a0f1c11405049873be99045f509fd9d40067f6b73577f622488894e75ec84d95bc082ef33443a5d04a017bf6acd63e76b61a4e0ccfd856da57f8d366
7
- data.tar.gz: bbb0ae3d2ecb3378e8b6028ba1432c89e8a715d4dae5b34da6b90285589be23f8492e2da012102c4586b88a2d88b3e33e56939d6025450a7acdbfd9834fd898c
6
+ metadata.gz: 70cee2cc3bf930a31a71924eb35d7791116d142f29667add832827b3bec5293556370874496ad62226b988d8aa1814cd80ff7b4d163bec95e9758cc7769fca6e
7
+ data.tar.gz: a2a6c0b553eb89e6e99f2917438861658a0d202737f408a40d04df41366dbf0e655d76b1506c0cf54909a3ee9170412d9adf60a15b2070c841aec24683ce8782
Binary file
Binary file
Binary file
Binary file
@@ -47,12 +47,47 @@ module Expressir
47
47
  end
48
48
  end
49
49
 
50
+ # Runs the checks. When the native extension exposes the core
51
+ # checker (issue #21), each file's model wire is checked in Rust;
52
+ # the findings are identical to this class's Ruby walk (gated by
53
+ # the checker parity suites). The Ruby walk stays as the
54
+ # fallback for non-native environments.
50
55
  def check
56
+ return check_via_core if core_check_available?
57
+
51
58
  @notes = []
52
59
  @repository.schemas.compact.each { |schema| check_schema(schema) }
53
60
  self
54
61
  end
55
62
 
63
+ def core_check_available?
64
+ Expressir::Express::Core::NATIVE_AVAILABLE &&
65
+ Expressir::Express::Core.respond_to?(:check_model_hash)
66
+ end
67
+
68
+ def check_via_core
69
+ # The Ruby Checker sees the whole repository (cross-file
70
+ # interfaces, self-schema defining schemas), so the wire keeps
71
+ # the repository shape when the model has one.
72
+ wire =
73
+ if @repository.respond_to?(:files)
74
+ {
75
+ "_class" => "Expressir::Model::Repository",
76
+ "files" => @repository.files.compact.map(&:to_hash),
77
+ }
78
+ else
79
+ @repository.to_hash
80
+ end
81
+ @notes = Expressir::Express::Core.check_model_hash(wire, @dialect)
82
+ .map do |note|
83
+ Note.new(
84
+ id: note[:id].to_sym, severity: note[:severity].to_sym,
85
+ schema: note[:schema], message: note[:message]
86
+ )
87
+ end
88
+ self
89
+ end
90
+
56
91
  def errors
57
92
  notes.select { |n| n.severity == :error }
58
93
  end
@@ -55,6 +55,23 @@ module Expressir
55
55
  ::Expressir::Core.scan_remarks(source)
56
56
  end
57
57
 
58
+ # Semantic checks (issue #21): the Checker's findings over one
59
+ # file's model-hash wire, as an Array of Hashes with
60
+ # id/severity/schema/message in the checker's canonical order.
61
+ # `dialect` is nil or a Dialect value; the 1994 edition is
62
+ # translated to the short form the core expects.
63
+ def self.check_model_hash(wire, dialect = nil)
64
+ raise NotImplementedError, "the native extension is unavailable" unless NATIVE_AVAILABLE
65
+
66
+ wire_json = JSON.generate(wire)
67
+ core_dialect = case dialect
68
+ when nil then nil
69
+ when Dialect::EDITION_1994, "10303-11:1994" then "1994"
70
+ else dialect.to_s
71
+ end
72
+ ::Expressir::Core.check_model_hash(wire_json, core_dialect)
73
+ end
74
+
58
75
  # Parse EXPRESS source into the hydrated model directly: the
59
76
  # extension walks the wire definition once and constructs every
60
77
  # node through Serializable.instantiate (lutaml-model's fast
@@ -3,6 +3,6 @@ module Expressir
3
3
  # autoload it (Ruby autoload only works for module/class constants, not
4
4
  # for string constants like `Expressir::VERSION`).
5
5
  module Version
6
- VERSION = "2.4.54".freeze
6
+ VERSION = "2.4.55".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressir
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.54
4
+ version: 2.4.55
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-05 00:00:00.000000000 Z
11
+ date: 2026-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64