Skip to content

Commit 60f2054

Browse files
committed
feat: add mock spec to udb gem for testing, add Condition classes
1 parent bc76954 commit 60f2054

File tree

1,697 files changed

+9501
-3678
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,697 files changed

+9501
-3678
lines changed

.vscode/settings.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
2-
"solargraph.bundlerPath": "bin/bundle",
2+
"solargraph.bundlerPath": "./bin/bundle",
33
"solargraph.useBundler": true,
44
"sorbet.lspConfigs": [
55

6+
67
{
78
"id": "container",
89
"name": "Sorbet (UDB)",
@@ -34,13 +35,13 @@
3435
"name": "Sorbet (Host)",
3536
"description": "Sorbet on the host",
3637
"command": [
37-
"/usr2/dhower/.rbenv/shims/bundle",
38+
"bundle",
3839
"exec",
3940
"srb",
4041
"typecheck",
4142
"--lsp",
4243
"--dir",
43-
"tools/gems",
44+
"tools/ruby-gems",
4445
"--ignore",
4546
"api_doc",
4647
"--ignore",
@@ -66,5 +67,11 @@
6667
]
6768
}
6869
],
69-
"sorbet.selectedLspConfigId": "host"
70+
"sorbet.selectedLspConfigId": "host",
71+
"rubyTestExplorer.debugCommand": "bundle exec rdebug-ide",
72+
"rubyTestExplorer.minitestCommand": "bundle exec rake",
73+
"rubyTestExplorer.rspecCommand": "bundle exec rspec",
74+
"rubyTestExplorer.testFramework": "minitest",
75+
"rubyTestExplorer.minitestDirectory": "./tools/ruby-gems/idlc/test/",
76+
"ipynb.experimental.serialization": false
7077
}

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ group :development do
3333
gem "awesome_print"
3434
gem "debug"
3535
gem "rdbg"
36+
gem "ruby-debug-ide"
3637
gem "rubocop-github"
3738
gem "rubocop-minitest"
3839
gem "rubocop-performance"

Gemfile.lock

Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,16 @@ GEM
3838
remote: https://rubygems.org/
3939
specs:
4040
Ascii85 (2.0.1)
41-
activesupport (8.0.2)
41+
activesupport (7.1.4.2)
4242
base64
43-
benchmark (>= 0.3)
4443
bigdecimal
45-
concurrent-ruby (~> 1.0, >= 1.3.1)
44+
concurrent-ruby (~> 1.0, >= 1.0.2)
4645
connection_pool (>= 2.2.5)
4746
drb
4847
i18n (>= 1.6, < 2)
49-
logger (>= 1.4.2)
5048
minitest (>= 5.1)
51-
securerandom (>= 0.3)
52-
tzinfo (~> 2.0, >= 2.0.5)
53-
uri (>= 0.13.1)
49+
mutex_m
50+
tzinfo (~> 2.0)
5451
addressable (2.8.7)
5552
public_suffix (>= 2.0.2, < 7.0)
5653
afm (0.2.2)
@@ -81,6 +78,8 @@ GEM
8178
base64 (0.3.0)
8279
benchmark (0.4.1)
8380
bigdecimal (3.2.2)
81+
cgi (0.5.0)
82+
coderay (1.1.3)
8483
commander (5.0.0)
8584
highline (~> 3.0.0)
8685
concurrent-ruby (1.3.5)
@@ -96,7 +95,8 @@ GEM
9695
diff-lcs (1.6.2)
9796
docile (1.4.1)
9897
drb (2.2.3)
99-
erb (5.0.1)
98+
erb (4.0.4)
99+
cgi (>= 0.3.3)
100100
erubi (1.13.1)
101101
hana (1.3.7)
102102
hashery (2.1.2)
@@ -122,16 +122,22 @@ GEM
122122
lint_roller (1.1.0)
123123
logger (1.7.0)
124124
matrix (0.4.2)
125+
method_source (1.1.0)
125126
minitest (5.25.5)
126-
netrc (0.11.0)
127+
mutex_m (0.3.0)
127128
nkf (0.2.0)
128129
nokogiri (1.18.8-aarch64-linux-gnu)
129130
racc (~> 1.4)
130131
nokogiri (1.18.8-x86_64-linux-gnu)
131132
racc (~> 1.4)
132133
observer (0.1.2)
133-
ostruct (0.6.1)
134+
ostruct (0.6.2)
134135
parallel (1.27.0)
136+
parlour (9.1.2)
137+
commander (~> 5.0)
138+
parser
139+
rainbow (~> 3.0)
140+
sorbet-runtime (>= 0.5)
135141
parser (3.3.8.0)
136142
ast (~> 2.4.1)
137143
racc
@@ -162,6 +168,9 @@ GEM
162168
prawn (~> 2.2)
163169
prettyprint (0.2.0)
164170
prism (1.4.0)
171+
pry (0.15.2)
172+
coderay (~> 1.1)
173+
method_source (~> 1.0)
165174
psych (5.2.6)
166175
date
167176
stringio
@@ -170,10 +179,6 @@ GEM
170179
rack (3.1.16)
171180
rainbow (3.1.1)
172181
rake (13.3.0)
173-
rbi (0.3.3)
174-
prism (~> 1.0)
175-
rbs (>= 3.4.4)
176-
sorbet-runtime (>= 0.5.9204)
177182
rbs (3.9.4)
178183
logger
179184
rdbg (0.1.0)
@@ -188,22 +193,22 @@ GEM
188193
nokogiri
189194
rexml (3.4.1)
190195
rouge (4.5.2)
191-
rubocop (1.76.0)
196+
rubocop (1.78.0)
192197
json (~> 2.3)
193198
language_server-protocol (~> 3.17.0.2)
194199
lint_roller (~> 1.1.0)
195200
parallel (~> 1.10)
196201
parser (>= 3.3.0.2)
197202
rainbow (>= 2.2.2, < 4.0)
198203
regexp_parser (>= 2.9.3, < 3.0)
199-
rubocop-ast (>= 1.45.0, < 2.0)
204+
rubocop-ast (>= 1.45.1, < 2.0)
200205
ruby-progressbar (~> 1.7)
201206
unicode-display_width (>= 2.4.0, < 4.0)
202-
rubocop-ast (1.45.0)
207+
rubocop-ast (1.45.1)
203208
parser (>= 3.3.7.2)
204209
prism (~> 1.4)
205-
rubocop-github (0.26.0)
206-
rubocop (>= 1.76)
210+
rubocop-github (0.23.0)
211+
rubocop (>= 1.72)
207212
rubocop-performance (>= 1.24)
208213
rubocop-rails (>= 2.23)
209214
rubocop-minitest (0.38.1)
@@ -220,23 +225,23 @@ GEM
220225
rack (>= 1.1)
221226
rubocop (>= 1.75.0, < 2.0)
222227
rubocop-ast (>= 1.44.0, < 2.0)
223-
rubocop-sorbet (0.10.2)
224-
lint_roller
225-
rubocop (>= 1.75.2)
228+
rubocop-sorbet (0.10.0)
229+
rubocop (>= 1)
230+
ruby-debug-ide (0.7.5)
231+
rake (>= 0.8.1)
226232
ruby-prof (1.7.2)
227233
base64
228234
ruby-progressbar (1.13.0)
229235
ruby-rc4 (0.1.5)
230236
rubyzip (2.4.1)
231-
securerandom (0.4.1)
232237
simplecov (0.22.0)
233238
docile (~> 1.1)
234239
simplecov-html (~> 0.11)
235240
simplecov_json_formatter (~> 0.1)
236241
simplecov-html (0.13.1)
237242
simplecov_json_formatter (0.1.4)
238243
simpleidn (0.2.3)
239-
solargraph (0.55.0)
244+
solargraph (0.56.0)
240245
backport (~> 1.2)
241246
benchmark (~> 0.4)
242247
bundler (~> 2.0)
@@ -248,6 +253,7 @@ GEM
248253
observer (~> 0.1)
249254
ostruct (~> 0.6)
250255
parser (~> 3.0)
256+
prism (~> 1.4)
251257
rbs (~> 3.3)
252258
reverse_markdown (~> 3.0)
253259
rubocop (~> 1.38)
@@ -263,28 +269,24 @@ GEM
263269
sorbet-static-and-runtime (0.5.12157)
264270
sorbet (= 0.5.12157)
265271
sorbet-runtime (= 0.5.12157)
266-
spoom (1.6.3)
272+
spoom (1.3.2)
267273
erubi (>= 1.10.0)
268-
prism (>= 0.28.0)
269-
rbi (>= 0.3.3)
270-
rexml (>= 3.2.6)
274+
prism (>= 0.19.0)
271275
sorbet-static-and-runtime (>= 0.5.10187)
272276
thor (>= 0.19.2)
273277
stringio (3.1.7)
274-
tapioca (0.16.11)
275-
benchmark
276-
bundler (>= 2.2.25)
277-
netrc (>= 0.11.0)
278-
parallel (>= 1.21.0)
279-
rbi (~> 0.2)
280-
sorbet-static-and-runtime (>= 0.5.11087)
281-
spoom (>= 1.2.0)
282-
thor (>= 1.2.0)
283-
yard-sorbet
278+
tapioca (0.4.27)
279+
bundler (>= 1.17.3)
280+
parlour (>= 2.1.0)
281+
pry (>= 0.12.2)
282+
sorbet-runtime
283+
sorbet-static (>= 0.4.4471)
284+
spoom
285+
thor (>= 0.19.2)
284286
terminal-table (4.0.0)
285287
unicode-display_width (>= 1.1.1, < 4)
286288
thor (1.3.2)
287-
tilt (2.6.0)
289+
tilt (2.6.1)
288290
treetop (1.6.12)
289291
polyglot (~> 0.3)
290292
ttfunk (1.7.0)
@@ -293,21 +295,17 @@ GEM
293295
unicode-display_width (3.1.4)
294296
unicode-emoji (~> 4.0, >= 4.0.4)
295297
unicode-emoji (4.0.4)
296-
uri (1.0.3)
297298
webrick (1.9.1)
298299
write_xlsx (1.12.1)
299300
nkf
300301
rubyzip (>= 1.0.0)
301302
yard (0.9.37)
302303
yard-solargraph (0.1.0)
303304
yard (~> 0.9)
304-
yard-sorbet (0.9.0)
305-
sorbet-runtime
306-
yard
307305

308306
PLATFORMS
309-
aarch64-linux-gnu
310-
x86_64-linux-gnu
307+
aarch64-linux
308+
x86_64-linux
311309

312310
DEPENDENCIES
313311
asciidoctor-diagram (~> 2.2)
@@ -328,6 +326,7 @@ DEPENDENCIES
328326
rubocop-minitest
329327
rubocop-performance
330328
rubocop-sorbet
329+
ruby-debug-ide
331330
ruby-prof
332331
ruby-progressbar (~> 1.13)
333332
simplecov

cfgs/example_rv64_with_overlay.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@ params:
547547
MTVEC_BASE_ALIGNMENT_DIRECT: 4
548548
MTVEC_BASE_ALIGNMENT_VECTORED: 4
549549
MSTATUS_FS_LEGAL_VALUES: [0, 1, 2, 3]
550-
MSTATUS_FS_WRITABLE: true
551550
MSTATUS_TVM_IMPLEMENTED: true
552551
HW_MSTATUS_FS_DIRTY_UPDATE: precise
553552
MSTATUS_VS_WRITABLE: true

doc/schemas.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ Many UDB data objects share common field types, including:
88
* xref:prose-schema.adoc[Schema for Prose]
99
1010
TODO
11+
12+
== Conditions
13+
14+
All conditions are represented using the same schema.

spec/schemas/csr_schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"description": "When specified, indicates that this field aliases (a portion of) another CSR field"
100100
},
101101
"definedBy": {
102-
"$ref": "schema_defs.json#/$defs/requires_entry",
102+
"$ref": "schema_defs.json#/$defs/condition",
103103
"description": "Where this field is defined: indicates that the field is only present if the extension(s) are implemented. If definedBy is not given, defaults to the definedBy field of the parent CSR"
104104
},
105105
"affectedBy": {
@@ -222,7 +222,7 @@
222222
"description": "Function of the field"
223223
},
224224
"definedBy": {
225-
"$ref": "schema_defs.json#/$defs/requires_entry",
225+
"$ref": "schema_defs.json#/$defs/condition",
226226
"description": "Extension(s) that define the CSR"
227227
},
228228
"address": {

0 commit comments

Comments
 (0)