Tags: cagix/sorbet
Tags
Make Sorbet faster to start in debug build (sorbet#8050) * Add timers to GlobalState::sanityCheck * Don't call sanityCheck so many times for no reason * ENFORCE -> ENFORCE_NO_TIMER in a lot of hot places These are all hot for the sake of reading the initial GlobalState, and are all ~trivial integer or boolean operations that should never take a long time (vs something like an `absl::c_count` that maps a function over a vector to compute a property). * fastmod 'if \(fuzz_mode\)' 'if constexpr (fuzz_mode)' In `--config=dbg` we don't necessarily get optimizations that would remove this check. I want to make sure it gets removed and that's easy with `constexpr`. * fastmod 'if \((!?)debug_mode\)' 'if constexpr (${1}debug_mode)' * Remove this counter that's not that useful * Some more not useful counterInc * tools/scripts/format_cxx.sh
Time#- and Time#+ can accept any class that implements to_r or to_int (… …sorbet#8044) ```ruby irb(main):001* class Foo irb(main):002* def to_int = 1 irb(main):003> end => :to_int irb(main):004> Time.now - Foo.new => 2024-07-19 17:02:47.577231 -0400 ``` https://github.com/ruby/ruby/blob/1e4c4fe478fccdc00565c609f6128172728d0f04/time.c#L528-L545
Wrap commands to create .bazelrc.local into a script (sorbet#8047)
Don't show untyped warning when method is `<method-name-missing>` (so… …rbet#8046) * Add failing test * Fix failing test * fix typo
Update docs in response to inferring `proc` returns (sorbet#8043) See ae377fd
Infer proc return types (sorbet#8023) * Infer proc return types These are the same change as a2a3f10 but for `Kernel#proc` instead of `Kernel#lambda`. * Fix two test error assertions * Stop looking at arguments.back() * Show old test behavior * Show new behavior
Add detailed error for T.class_of(...) <: T::Class[...] (sorbet#8041)
Hide Hash::Elem in detailed type errors (sorbet#8038) * Add failing test * Fix failing test
delete isAttrReader (sorbet#8039) * delete isAttrReader * update exp tests * delete compiled: true * Delete these tests They're now the same as the non compiled version.
SyntheticMethod -> Method (sorbet#8040)
PreviousNext