expressir 2.4.56 → 2.4.57

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: a538e044b224fb0f69703d44d79f683d256113c419a13016de659ef971cde5ca
4
- data.tar.gz: 3c0fd091a74ed3808cf337cafd146b01f65c4f796f46dd9d61f59cfefa9ad195
3
+ metadata.gz: 4399f71a09e70ee8efc74ed8ab96b6f4d9dedb72c23eb04a92b7aba57181f794
4
+ data.tar.gz: 6f685947f250eced9f3775bb37f44cede997b1991c03db5a126a2e2c1c3dd4c8
5
5
  SHA512:
6
- metadata.gz: 43d186c80eab324cd0130b9cd517ce62961e842c289a157a9db14b9a2594d2261562fc9ff711049c0df3fa8c2e064c7ef14ae673eb8f215d9fa1c6063b40aaae
7
- data.tar.gz: 64c8eb4f46c972b4dcaa8c93614e3a9e126c58bb842c11295f8ff8fa0bccef2ae48b9f0db33236af022435bed8fb24348d2ba28dcea18242af19cb7c60d5c408
6
+ metadata.gz: ca081e5d422160ab4061b7b68f3e4c2692845b0e463d47d9a45dbe9c47afc0df377f0dc93b4a2e0eb80b84443514152cf8c67b4069b943650c0cbcf5c13eea75
7
+ data.tar.gz: 7bc334ebf691f931250ef6cba5374f248e928fea3c148b1d4d2eb0c3bcd9c7285cf64238983f93d02c6d113ec28c787892c768de4701d51aec24ba63ec74aa53
@@ -13,7 +13,7 @@ magnus = { version = "0.9" }
13
13
  # Pinned core release (M1, TODO.parity-ee/19): the ext never floats
14
14
  # main — bump the tag per expressir release, alongside the validation
15
15
  # run that pins it.
16
- expressir-rs = { git = "https://github.com/lutaml/expressir-rs", tag = "v0.1.25" }
16
+ expressir-rs = { git = "https://github.com/lutaml/expressir-rs", tag = "v0.1.26" }
17
17
  serde_json = "1.0"
18
18
 
19
19
 
@@ -103,6 +103,15 @@ module Expressir
103
103
  @cached_schema_grammar_json
104
104
  end
105
105
 
106
+ # Lane retirement (expressir#587): EXPRESSIR_DISABLE_RUBY_PARSE
107
+ # turns the Ruby parse lanes (the artifact replay and the DSL
108
+ # evaluation) into hard failures, so the suite can prove the
109
+ # native lane stands alone. The lanes remain emergency
110
+ # fallbacks without the env.
111
+ def self.ruby_parse_disabled?
112
+ ENV["EXPRESSIR_DISABLE_RUBY_PARSE"] == "1"
113
+ end
114
+
106
115
  # Parse using native engine with Rust-side transformation (fastest)
107
116
  #
108
117
  # This method provides ~17x speedup over pure Ruby parsing.
@@ -151,6 +160,10 @@ module Expressir
151
160
  PARG_COMPONENTS_DIR = File.join(__dir__, "parg")
152
161
 
153
162
  def self.parse_artifact(source)
163
+ if ruby_parse_disabled?
164
+ raise NotImplementedError,
165
+ "Ruby parse lanes disabled (EXPRESSIR_DISABLE_RUBY_PARSE)"
166
+ end
154
167
  raise LoadError, "Edition-2 artifact not available" unless artifact_available?
155
168
 
156
169
  @parser_mutex.synchronize do
@@ -168,8 +181,15 @@ module Expressir
168
181
  # The Ruby-lane parse: the edition-2 artifact first, the DSL
169
182
  # parser as fallback (issue #578 STEP 4).
170
183
  def self.parse_ruby(source)
184
+ if ruby_parse_disabled?
185
+ raise NotImplementedError,
186
+ "Ruby parse lanes disabled (EXPRESSIR_DISABLE_RUBY_PARSE)"
187
+ end
188
+
171
189
  parse_artifact(source)
172
190
  rescue StandardError, NotImplementedError
191
+ raise if ruby_parse_disabled?
192
+
173
193
  cached_parser.parse(source)
174
194
  end
175
195
 
@@ -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.56".freeze
6
+ VERSION = "2.4.57".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressir
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.56
4
+ version: 2.4.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.