Skip to content

Commit a74cd0f

Browse files
refactor: move code under tools/, data under spec/ (#797)
This also: - Creates proper Ruby Gems for - The IDL Compiler (idlc) - The Ruby UDB interface (udb) - Backend helpers (udb_helpers) and an idl highlighter (idl_highlighter) - Adds a `./bin/udb` command line interface to query the data - Adds a `./bin/idlc` command line interface to engage the IDL compiler - A lot more type checking in Ruby code BREAKING CHANGE: major file refactoring --------- Signed-off-by: Derek Hower <134728312+dhower-qc@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent b1761ee commit a74cd0f

File tree

2,834 files changed

+424104
-30673
lines changed

Some content is hidden

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

2,834 files changed

+424104
-30673
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: singularity setup
2626
uses: ./.github/actions/singularity-setup
2727
- name: Create many artifacts in the _site directory
28-
run: /bin/bash lib/deploy.sh
28+
run: /bin/bash tools/scripts/deploy.sh
2929
- name: Setup Pages
3030
uses: actions/configure-pages@v5
3131
- name: Upload artifact

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
.vscode/*
1111
!.vscode/launch.json
1212
!.vscode/extensions.json
13+
!.vscode/settings.json
1314
.container-type
1415
diag-ditaa-*
1516
arch/manual/isa/**/riscv-isa-manual
@@ -23,4 +24,6 @@ __pycache__/
2324
*.bak
2425
*.log
2526
sorbet
27+
!tools/ruby-gems/idlc/sorbet
28+
!tools/ruby-gems/udb/sorbet
2629
coverage

.rubocop.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
require: rubocop-minitest
1+
plugins:
2+
- rubocop-minitest
3+
- rubocop-performance
4+
- rubocop-sorbet
5+
6+
inherit_gem:
7+
rubocop-github:
8+
- config/default.yml
29

310
AllCops:
411
TargetRubyVersion: 3.2.3

.sorbet-config

Lines changed: 0 additions & 8 deletions
This file was deleted.

.tapioca-config.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"solargraph.bundlerPath": "bin/bundle",
3+
"solargraph.useBundler": true,
4+
"sorbet.lspConfigs": [
5+
6+
{
7+
"id": "container",
8+
"name": "Sorbet (UDB)",
9+
"description": "Sorbet in the UDB container",
10+
"command": [
11+
"/local/mnt/workspace/dhower/riscv-unified-db/worktrees/udbgem/bin/bundle",
12+
"exec",
13+
"srb",
14+
"tc",
15+
"--lsp",
16+
"--dir",
17+
"tools/gems",
18+
"--ignore",
19+
"api_doc",
20+
"--ignore",
21+
"doc",
22+
"--ignore",
23+
"ext",
24+
"--ignore",
25+
"python",
26+
"-v",
27+
"3",
28+
"--debug-log-file=srb-lsp.out",
29+
"--disable-watchman"
30+
]
31+
},
32+
{
33+
"id": "host",
34+
"name": "Sorbet (Host)",
35+
"description": "Sorbet on the host",
36+
"command": [
37+
"/usr2/dhower/.rbenv/shims/bundle",
38+
"exec",
39+
"srb",
40+
"typecheck",
41+
"--lsp",
42+
"--dir",
43+
"tools/gems",
44+
"--ignore",
45+
"api_doc",
46+
"--ignore",
47+
"doc",
48+
"--ignore",
49+
"ext",
50+
"--ignore",
51+
"python",
52+
"--disable-watchman"
53+
]
54+
},
55+
{
56+
"id": "experimental",
57+
"name": "Sorbet (Experimental)",
58+
"description": "Experimental Sorbet Ruby IDE features (warning: crashy, for developers only)",
59+
"command": [
60+
"bundle",
61+
"exec",
62+
"srb",
63+
"typecheck",
64+
"--lsp",
65+
"--enable-all-experimental-lsp-features"
66+
]
67+
}
68+
],
69+
"sorbet.selectedLspConfigId": "host"
70+
}

Gemfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
# frozen_string_literal: true
22

3-
ruby "3.2.3"
3+
ruby "~> 3.2"
4+
5+
# local gems in UDB
6+
gem "idlc", path: "tools/ruby-gems/idlc"
7+
gem "idl_highlighter", path: "tools/ruby-gems/idl_highlighter"
8+
gem "udb_helpers", path: "tools/ruby-gems/udb_helpers"
9+
gem "udb", path: "tools/ruby-gems/udb"
410

511
source "https://rubygems.org"
612

7-
gem "activesupport"
13+
# gem "activesupport"
814
gem "asciidoctor-diagram", "~> 2.2"
915
gem "asciidoctor-pdf"
1016
gem "base64"
1117
gem "bigdecimal"
1218
gem "concurrent-ruby", require: "concurrent"
1319
gem "concurrent-ruby-ext"
1420
gem "json_schemer", "~> 1.0"
15-
gem "pygments.rb"
21+
# gem "pygments.rb"
1622
gem "rake", "~> 13.0"
17-
gem "rouge"
23+
#gem "rouge"
1824
gem "ruby-progressbar", "~> 1.13"
1925
gem "sorbet-runtime"
20-
gem "treetop", "1.6.12"
26+
#gem "treetop", "1.6.12"
2127
gem "ttfunk", "1.7" # needed to avoid having asciidoctor-pdf dependencies pulling in a buggy version of ttunk (1.8)
2228
gem "webrick"
2329
gem "write_xlsx"
@@ -26,11 +32,12 @@ gem "yard"
2632
group :development do
2733
gem "awesome_print"
2834
gem "debug"
29-
gem "minitest"
3035
gem "rdbg"
36+
gem "rubocop-github"
3137
gem "rubocop-minitest"
38+
gem "rubocop-performance"
39+
gem "rubocop-sorbet"
3240
gem "ruby-prof"
33-
gem "ruby-prof-flamegraph", git: "https://github.com/oozou/ruby-prof-flamegraph.git", ref: "fc3c437", require: false
3441
gem "solargraph"
3542
gem "sorbet"
3643
gem "spoom"

0 commit comments

Comments
 (0)