udb 0.1.7 → 0.1.9

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: dc1b8087c0c2fd3a61f04aef6d7a8da8192c5bca4a7796889cae7324846a79c9
4
- data.tar.gz: 58d1654b58b688a4c86c53cffbe88ec522a8c99799c8b70ad08a5e06838ddd8b
3
+ metadata.gz: eacb60feeaaca9c368b3e7785efe85a03e6cf32a228b2e9b73a75eee1e527a6b
4
+ data.tar.gz: da1c153ff0e163d593f2ece814b9e71d3de7a421795920f9f688913f26ae170e
5
5
  SHA512:
6
- metadata.gz: 87adb233da1614b8f034b2a5d6461617f99d408c37bd07daa131416690f309922c419316275c04392994cef252f303adc1087d4d050d4dae261e59fdaaafb5e8
7
- data.tar.gz: 338ce7c06563e08d60b905fcc5d4ae106617e0555e470eb3a2d2dd4415af75f7a120f845227e9d1ef950aa458ed3535c146192d664e7ddfebb7a2b1c04633e46
6
+ metadata.gz: 920b67cb9bf2b9a6227b1251c3387050e2ea9257d400152dfc10c71dd53ff7f79bbf336749859755d415dff899b0f519a764a8e75e9d0c62d0cfedb88cef09fa
7
+ data.tar.gz: 34d834ebf04de3fc3da7e9ea61e84236235ef4001aadb4f53237d8afbdf5f169064ddad49c717eedee9444e4860875105623b7ef6b292a2ab94364404d9f6afa
@@ -606,7 +606,6 @@ params:
606
606
  TRAP_ON_ECALL_FROM_M: true
607
607
  TRAP_ON_ECALL_FROM_U: true
608
608
  TRAP_ON_EBREAK: true
609
- TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY: false
610
609
  MSTATEEN_ENVCFG_TYPE: rw
611
610
  HSTATEEN_ENVCFG_TYPE: rw
612
611
  PRECISE_SYNCHRONOUS_EXCEPTIONS: true
@@ -191,7 +191,6 @@ params:
191
191
  STVEC_MODE_VECTORED: true
192
192
  SATP_MODE_BARE: true
193
193
  TRAP_ON_ECALL_FROM_S: true
194
- TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY: false
195
194
  MSTATUS_VS_LEGAL_VALUES: [0]
196
195
  MSTATUS_FS_LEGAL_VALUES: [3, 2, 1, 0]
197
196
  MSTATUS_TVM_IMPLEMENTED: false
@@ -204,7 +204,6 @@ params:
204
204
  SATP_MODE_BARE: true
205
205
  TRAP_ON_ECALL_FROM_S: true
206
206
  TRAP_ON_ECALL_FROM_U: true
207
- TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY: false
208
207
  MSTATUS_VS_LEGAL_VALUES: [0, 1, 2, 3]
209
208
  HW_MSTATUS_FS_DIRTY_UPDATE: precise
210
209
  MSTATUS_FS_LEGAL_VALUES: [0, 3]
@@ -190,7 +190,6 @@ params:
190
190
  SATP_MODE_BARE: true
191
191
  TRAP_ON_ECALL_FROM_S: true
192
192
  TRAP_ON_ECALL_FROM_U: true
193
- TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY: false
194
193
  MSTATUS_VS_LEGAL_VALUES: [0]
195
194
  MSTATUS_FS_LEGAL_VALUES: [3, 2, 1, 0]
196
195
  MSTATUS_TVM_IMPLEMENTED: false
@@ -202,7 +202,6 @@ params:
202
202
  SATP_MODE_BARE: true
203
203
  TRAP_ON_ECALL_FROM_S: true
204
204
  TRAP_ON_ECALL_FROM_U: true
205
- TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY: false
206
205
  MSTATUS_VS_LEGAL_VALUES: [0, 1, 2, 3]
207
206
  MSTATUS_FS_LEGAL_VALUES: [0, 1, 2, 3]
208
207
  MSTATUS_TVM_IMPLEMENTED: false
data/lib/udb/condition.rb CHANGED
@@ -2007,7 +2007,10 @@ module Udb
2007
2007
  elsif yaml.key?("anyOf")
2008
2008
  LogicNode.new(LogicNodeType::Or, yaml["anyOf"].map { |node| to_logic_tree_helper(node) })
2009
2009
  elsif yaml.key?("noneOf")
2010
- LogicNode.new(LogicNodeType::Or, yaml["noneOf"].map { |node| to_logic_tree_helper(node) })
2010
+ LogicNode.new(
2011
+ LogicNodeType::Not,
2012
+ [LogicNode.new(LogicNodeType::Or, yaml["noneOf"].map { |node| to_logic_tree_helper(node) })]
2013
+ )
2011
2014
  elsif yaml.key?("oneOf")
2012
2015
  LogicNode.new(LogicNodeType::Xor, yaml["oneOf"].map { |node| to_logic_tree_helper(node) })
2013
2016
  elsif yaml.key?("not")
data/lib/udb/logic.rb CHANGED
@@ -316,7 +316,7 @@ module Udb
316
316
  end
317
317
  end
318
318
 
319
- ValueType = T.type_alias { T.any(Integer, String, T::Boolean, T::Array[T.any(Integer, String)]) }
319
+ ValueType = T.type_alias { T.any(Integer, String, T::Boolean, T::Array[T.any(Integer, String, T::Boolean)]) }
320
320
 
321
321
  sig { params(yaml: T::Hash[String, T.untyped]).void }
322
322
  def initialize(yaml)
@@ -1034,9 +1034,11 @@ module Udb
1034
1034
  elsif !@yaml.key?("includes") && other_param.to_h.key?("includes")
1035
1035
  -1
1036
1036
  end
1037
- elsif @yaml.key?("oneOf") || other_param.to_h.key?("oneOf")
1038
- if @yaml.key?("oneOf") && other_param.to_h.key?("oneOf")
1039
- @yaml.fetch("oneOf") <=> other_param.to_h.fetch("oneOf")
1037
+ elsif @yaml.key?("oneOf") || other_param.comparison_type == ParameterComparisonType::OneOf
1038
+ if @yaml.key?("oneOf") && other_param.comparison_type == ParameterComparisonType::OneOf
1039
+ one_of = @yaml.fetch("oneOf")
1040
+ other_one_of = T.cast(other_param.comparison_value, T::Array[T.untyped])
1041
+ one_of.map { |e| [e.class.name, e.to_s] } <=> other_one_of.map { |e| [e.class.name, e.to_s] }
1040
1042
  elsif @yaml.key?("oneOf")
1041
1043
  1
1042
1044
  else
@@ -1054,14 +1056,20 @@ module Udb
1054
1056
  comparison_type <=> other_param.comparison_type
1055
1057
  elsif comparison_value != other_param.comparison_value
1056
1058
  cv = comparison_value
1057
- if cv.is_a?(String)
1058
- cv <=> T.cast(other_param.comparison_value, String)
1059
+ ocv = other_param.comparison_value
1060
+ if cv.class != ocv.class
1061
+ cv.class.name <=> ocv.class.name
1062
+ elsif cv.is_a?(String)
1063
+ cv <=> T.cast(ocv, String)
1059
1064
  elsif cv.is_a?(Array)
1060
- cv <=> T.cast(other_param.comparison_value, T::Array[T.any(String, T::Boolean, Integer)])
1061
- elsif cv.is_a?(Integer)
1062
- T.cast(comparison_value, Integer) <=> T.cast(other_param.comparison_value, Integer)
1065
+ ocv_arr = T.cast(ocv, T::Array[T.any(String, T::Boolean, Integer)])
1066
+ cv.map { |e| [e.class.name, e.to_s] } <=> ocv_arr.map { |e| [e.class.name, e.to_s] }
1063
1067
  else
1064
- T.cast(comparison_value, T::Boolean) <=> T.cast(other_param.comparison_value, T::Boolean)
1068
+ # cv and ocv have the same class (not String, not Array).
1069
+ # Given the type constraints (String, Boolean, Integer), this is Integer.
1070
+ # Two booleans with the same value are equal (cv != ocv is false), so
1071
+ # TrueClass or FalseClass values never reach here.
1072
+ T.cast(cv, Integer) <=> T.cast(ocv, Integer)
1065
1073
  end
1066
1074
  else
1067
1075
  # these are the same (ignoring reason)
data/lib/udb/version.rb CHANGED
@@ -5,5 +5,5 @@
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module Udb
8
- def self.version = "0.1.7"
8
+ def self.version = "0.1.9"
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: udb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Hower
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-03-31 00:00:00.000000000 Z
12
+ date: 2026-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport