Commit 375290a
authored
[release] 2.7.1 - fix sorbet compatibility (#407)
Sorbet’s T::Sig monkey-patches Ruby’s Kernel#require, which breaks
Statsig’s internal lazy-loading during Statsig.initialize. When extend
T::Sig is used anywhere in a project, Statsig fails to load internal
classes like Statsig::UserPersistentStorageUtils, causing silent
initialization failures and incorrect gate checks.
This change replaces all internal require calls in the SDK with
require_relative.
Using require_relative ensures internal files resolve correctly
regardless of Sorbet’s patched require
External dependencies are untouched
thanks to simon jenkins of instacart for the thorough bug report and
suggested fix
>Included In This Release
>- a4afc23 tore-statsig
> - fix: sorbet compatibility for internal deps (#404)
>- 7db8d47 tore-statsig
> - fix: code coverage setup + tests (#405)1 parent a4afc23 commit 375290a
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments