Skip to content

Tags: penelope-stripe/sorbet

Tags

0.5.5890.20200902140719-660015a79

Toggle 0.5.5890.20200902140719-660015a79's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix the symbols category counter for class symbols. (sorbet#3400)

0.5.5889.20200902120938-42fb68639

Toggle 0.5.5889.20200902120938-42fb68639's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Break up symbol table into per-symbol-type tables. (sorbet#3224)

Break up symbol table into per-symbol-type tables.

I've broken up the single monolithic `symbols` vector into 5 vectors:

* `classAndModules`
* `methods`
* `fields` (static and non-static)
* `typeArguments`
* `typeMembers`

I am open to combining any of the above if separating the symbols out yields few benefits. For example, I'm not sure if type arguments and type members actually have any special fields between them.

**One potentially controversial design decision: Index 0 is not reserved as a special "no symbol" slot for every vector.** I did this so that Sorbet only has one "noSymbol" SymbolRef, and that's classAndModules index 0. I figured that having multiple ways to represent no symbol could be a footgun (see also: people complaining about NaN in floating point being a range rather than a single value), but I can be talked into reserving index 0 in every symbol type vector.

Another consequence of this design decision is that the CLI argument to scale the symbol table has been split into 5 separate command line arguments, which I think is fine; that's used for advanced tuning scenarios where performance matters.

### Motivation
<!-- Why make this change? Describe the problem, not the solution. This can also be a link to an issue. -->

* Make it possible to specialize symbols of a specific type. This will let us 1) reduce memory consumption and 2) make it faster to construct/copy symbols.
* Make it easier to iterate over only the symbol types code cares about. Many passes only need to pass over classes, for example.

0.5.5888.20200901205544-9de44f60b

Toggle 0.5.5888.20200901205544-9de44f60b's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Allow vanilla ruby installations (sorbet#3257)

* Allow vanilla ruby installations

The previous logic did not find gems in a default ruby/rubygems
installation. For example the default path for user-installed gems on
macOS is `$HOME/.gem/ruby/2.6.0`. This was matched by the very first
pattern, `/^.*\/(ruby)\/([\d.]+)\//`, determining that this is the
location of a gem called `ruby` version 2.6.0, which is wrong.

This revision adds a much more general pattern which matches the default
gem path, and also customised BUNDLE_PATH (for users installing gems
into `$MY_PROJECT/bundle` for example). The new pattern must come before
the `# ruby` pattern for the aforementioned reason, subsuming the
previous `# gem` pattern; so that has been removed.

* Tighten the regex in accordance with the original

The new regex was undesriably accepting. Tightened to support only the
use cases intended.

0.5.5887.20200901115332-6a52231d3

Toggle 0.5.5887.20200901115332-6a52231d3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix output name for AttachedClass (sorbet#3380)

Signed-off-by: Alexandre Terrasa <[email protected]>

0.5.5886.20200901114615-552aa822d

Toggle 0.5.5886.20200901114615-552aa822d's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix signature for String::lines (sorbet#3371)

Signed-off-by: Alexandre Terrasa <[email protected]>

0.5.5885.20200901113557-48081b73d

Toggle 0.5.5885.20200901113557-48081b73d's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix File::ALT_SEPARATOR type (sorbet#3367)

Fixes sorbet#2688.

Signed-off-by: Alexandre Terrasa <[email protected]>

0.5.5884.20200901113223-4aa9ad875

Toggle 0.5.5884.20200901113223-4aa9ad875's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Rename parameter `usec_with_frac` into `tz` for Time#initialize (sorb…

…et#3374)

Signed-off-by: Alexandre Terrasa <[email protected]>

0.5.5883.20200831150709-de7b6314a

Toggle 0.5.5883.20200831150709-de7b6314a's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
docs: Update pipeline for parallel namer/resolver (sorbet#3384)

* docs: Update pipeline for parallel namer/resolver

These were still depicted as sequential in our docs, but I think it's
worth pointing out that while they can be be thought of as sequential
for a mental model, they're not truly sequential.

* More docs updates

* Typos and TODOs

0.5.5882.20200831134621-3893a0ec7

Toggle 0.5.5882.20200831134621-3893a0ec7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix Packager crash on typed: ignore files. (sorbet#3393)

* Debug line for p-s crash

* Failing test case.

* Fix packager crash when file is marked typed: ignore.

These files have no ASTs (EmptyTree).

0.5.5881.20200827143727-b8b35b39c

Toggle 0.5.5881.20200827143727-b8b35b39c's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Improve T::Struct docs (sorbet#3390)

* Improve T::Struct docs

* Use longer placeholders