Tags: Shopify/sorbet
Tags
remove `SendAndBlockLink::duplicate()` (sorbet#8424)
Allow extend T::Sig at the top level (sorbet#3491) * Allow extend T::Sig at the top level This is particularly handy for scripts, where you just want to write everything at the top-level of a file. Sorbet already type checks using `extend T::Sig` and `sig` at the top level of a file correctly, so it's annoying to have it not work when I copy/paste an example into a file and run it. I very much don't want to encourage that people do this except in small files. In large projects, if there are lots of top-level defined methods, Sorbet will think they are all defined and available because it has no way to know which files are the entrypoints to a program and will thus never be run at the same time as other files. But for small projects I think this is pretty nice. Especially one-off scripts. * Add a test
Support class methods in symbol search (sorbet#3489) * Support class methods in symbol search * Fix test * Cleanup package output * Update core/Symbols.cc Co-authored-by: John Vilk <[email protected]> Co-authored-by: Kevin Miller <[email protected]> Co-authored-by: John Vilk <[email protected]>
Add T::Enum#each_values, take 2 (sorbet#3487) * Revert "Revert "Add T::Enum.each_values (sorbet#3418)" (sorbet#3481)" This reverts commit 53b63a3. * add enum.rbi signature
Make VSCode symbol search work for nested ruby (sorbet#3475) * Make VSCode symbol search work for nested ruby VSCode has its own internal ranking of returned search results that compares the search string against the returned symbol name (ignoring the container). Part of this symbol search short-circuits if the query string is not a subsequence of the result string. Therefore `Foo::Bar` query will short-circuit on the result `Bar` since `Foo::` does not appear in `Bar`. To work around this issue, return the full name as the name to appease VSCode. * Update tests Co-authored-by: Kevin Miller <[email protected]>
Revert "Add T::Enum.each_values (sorbet#3418)" (sorbet#3481) This reverts commit 4882e3f.
Add T::Enum.each_values (sorbet#3418) * Add T::Enum.each_values * Add test and fix block handling
Add package support to `T::NonForcingConstants` (sorbet#3470) * Add helper method to mangle a package name in the same way as packager pass * Update RBI to know about third optional arg to non_forcing_is_a * Implement support for packaged non_forcing_is_a in resolver * Add test case * Update exps * Add stubbed-out runtime implementation * Handle `package` being a keyword arg * Update exp files * Also return if the package literal is not a string * format_cxx * Fix runtime behavior... for now * Remove expectation test for now * Change to lookupMangledPackageName * Add test to exercise non-existent package and fix error message printing * Just else * Add a comment too * Share the comment * Add todo comment
update_testdata_exp.sh should update index-tree files (sorbet#3476)
Add missing RBI definitions for RubyVM's AbstractSyntaxTree and Node (s… …orbet#3440) * Add missing RBI definitions for RubyVM::AbstractSyntaxTree and RubyVM::AbstractSyntaxTree::Node Signed-off-by: Alexandre Terrasa <[email protected]> * Update expected output for hidden definition tests Signed-off-by: Alexandre Terrasa <[email protected]>
PreviousNext