Tags: penelope-stripe/sorbet
Tags
Fix the symbols category counter for class symbols. (sorbet#3400)
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.
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.
Fix output name for AttachedClass (sorbet#3380) Signed-off-by: Alexandre Terrasa <[email protected]>
Fix signature for String::lines (sorbet#3371) Signed-off-by: Alexandre Terrasa <[email protected]>
Fix File::ALT_SEPARATOR type (sorbet#3367) Fixes sorbet#2688. Signed-off-by: Alexandre Terrasa <[email protected]>
Rename parameter `usec_with_frac` into `tz` for Time#initialize (sorb… …et#3374) Signed-off-by: Alexandre Terrasa <[email protected]>
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
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).
Improve T::Struct docs (sorbet#3390) * Improve T::Struct docs * Use longer placeholders
PreviousNext