Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ GEM
minitest (6.0.3)
drb (~> 2.0)
prism (~> 1.5)
mocha (3.1.0)
ruby2_keywords (>= 0.0.5)
netrc (0.11.0)
nkf (0.2.0)
numbers_and_words (1.0.3)
Expand Down Expand Up @@ -248,6 +250,7 @@ GEM
ostruct
ruby-progressbar (1.13.0)
ruby-rc4 (0.1.5)
ruby2_keywords (0.0.5)
rubyzip (3.2.2)
securerandom (0.4.1)
simplecov (0.22.0)
Expand Down Expand Up @@ -345,6 +348,7 @@ DEPENDENCIES
idl_highlighter!
idlc!
minitest
mocha
rake
rdbg
rouge
Expand Down
7 changes: 0 additions & 7 deletions bin/chore
Original file line number Diff line number Diff line change
Expand Up @@ -482,13 +482,6 @@ do_ruby_type_def() {
cd "${UDB_ROOT}" || exit 1
"${UDB_ROOT}"/bin/bundle exec --gemfile "${UDB_ROOT}"/Gemfile tapioca gems --all
"${UDB_ROOT}"/bin/bundle exec --gemfile "${UDB_ROOT}"/Gemfile tapioca dsl

# tapioca annotations requires the ext/rbi-central submodule to be initialized.
if [ ! -f "${UDB_ROOT}/ext/rbi-central/index.json" ]; then
echo "Initializing ext/rbi-central submodule..."
git -C "${UDB_ROOT}" submodule update --init ext/rbi-central
fi
"${UDB_ROOT}"/bin/bundle exec --gemfile "${UDB_ROOT}"/Gemfile tapioca annotations
Comment on lines -485 to -491
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhower-qc and/or @jordancarlin, thoughts here? @thecharlesjenkins explained this change in the commit message a3f4b4f:

Tapioca annotations in rbi-central are community maintained and are not
always correct. Remove them from the chore script to avoid them being
forcefully added by the CI. This was making it impossible to add "mocha"
as a dependency because the rbi-central types are conflicting with the
sorbet-typed versions.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this at the UDB PR meeting today. The thought is that this may have crossed paths with some Ruby Gemfile changes. Could you restore this code, rebase, then see if any related issues are no longer present?

}

#
Expand Down
3 changes: 2 additions & 1 deletion bin/generate
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ help() {
echo " cfg-c-header: Generate C header for a config ('generate cfg-c-header -h' for more)"
echo " cfg-svh-header: Generate SystemVerilog header for a config ('generate cfg-svh-header -h' for more)"
echo " ext-doc: Generate documentation for an extension ('generate ext-doc -h' for more)"
echo " inst-table: Generate instruction table ('generate inst-table -h' for more)"
echo " isa-explorer: Generate tables of ISA information ('generate isa-explorer -h' for more)"
echo " manual: Generate ISA manual ('generate manual -h' for more)"
echo ""
Expand All @@ -50,7 +51,7 @@ done
subcommand=$1

case "$subcommand" in
ext-doc | isa-explorer | manual | cfg-c-header | cfg-svh-header )
ext-doc | isa-explorer | manual | cfg-c-header | cfg-svh-header | inst-table)
exec "${ROOT}/udb-gen" "${@:1}"
exit 0
;;
Expand Down
9 changes: 9 additions & 0 deletions sorbet/rbi/gems/mocha@3.1.0.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions tools/ruby-gems/tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,30 @@ namespace :release do
end
end
end

namespace :test do
namespace :udb_gen do
desc "Run tests for the udb_gen gem"
task :unit do
Dir.chdir($root / "tools/ruby-gems/udb-gen") do
sh "ruby -Ilib:test test/unit/run.rb"
end
end
task :integration do
Dir.chdir($root / "tools/ruby-gems/udb-gen") do
sh "ruby -Ilib:test test/integration/run.rb"
end
end
end
end

namespace :chore do
namespace :udb_gen do
task :update_fixtures do
Dir.chdir($root / "tools/ruby-gems/udb-gen") do
sh "UPDATE_FIXTURES=1 ruby -Ilib:test test/unit/run.rb --include test_builder_generation"
sh "UPDATE_FIXTURES=1 ruby -Ilib:test test/integration/run.rb --include test_builder_generation"
end
end
end
end
Loading
Loading