Sorbet install: Difference between revisions

From wikinotes
No edit summary
Line 1: Line 1:
= Gemfile =
= Initial Setup =
<blockquote>
== Gemfile ==
<blockquote>
<blockquote>
<syntaxhighlight lang="ruby">
<syntaxhighlight lang="ruby">
Line 11: Line 13:
</blockquote><!-- Gemfile -->
</blockquote><!-- Gemfile -->


= Init =
== Init ==
<blockquote>
<blockquote>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 18: Line 20:
</blockquote><!-- Init -->
</blockquote><!-- Init -->


= Dependencies =
== Dependencies ==
<blockquote>
<blockquote>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 25: Line 27:
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Dependencies -->
</blockquote><!-- Dependencies -->
</blockquote><!-- Initial Setup -->
= Shim Generation / Ignores =
<blockquote>
== Ignore Directories ==
<blockquote>
<syntaxhighlight lang="ruby">
# ${PROJECT}/sorbet/config
--ignore=/tmp/
--ignore=/vendor/bundle
</syntaxhighlight>
</blockquote><!-- Ignore Directories -->


= Shims =
== Shims ==
<blockquote>
<blockquote>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 33: Line 47:
</blockquote><!-- Shims -->
</blockquote><!-- Shims -->


= Tapioca Requires =
== Tapioca Requires ==
<blockquote>
<blockquote>
You can require gems during the <code>srb gems</code> execution which executes shims to help with dynamic code
You can require gems during the <code>srb gems</code> execution which executes shims to help with dynamic code
Line 42: Line 56:
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Tapioca Requires -->
</blockquote><!-- Tapioca Requires -->
</blockquote><!-- Shim Generation / Ignores -->

Revision as of 20:17, 4 November 2023

Initial Setup

Gemfile

source "https://rubygems.org"

gem "sorbet"
gem "sorbet-runtime"
gem "sorbet-static"
gem "tapioca"

Init

bundle exec srb init

Dependencies

aur sync watchman-bin
pacman -S watchman-bin

Shim Generation / Ignores

Ignore Directories

# ${PROJECT}/sorbet/config
--ignore=/tmp/
--ignore=/vendor/bundle

Shims

bundle exec srb gems  # generate shims for gems

Tapioca Requires

You can require gems during the srb gems execution which executes shims to help with dynamic code

# sorbet/tapioca/require.rb

require "thor"