Commit ce69f31
Fix Steep failures from over-tight type-fill + reinstate scheduler_loop ignore
CI's Steep run flagged 10 errors after the previous "fill in concrete types"
commit. Two type-fill changes were too tight, and one steep:ignore removal
was unverified locally because libdatadog version mismatch blocked Steep
here at the time. CI surfaced all three.
1. Component @logger / initialize logger / environment_supported? logger:
revert to `untyped`. The tightened `SymbolDatabase::Logger` type didn't
match Uploader's `Datadog::Core::Logger` parameter type, surfacing a
long-standing inconsistency between the SymDB Logger wrapper and the
downstream component sig declarations. Reverting to `untyped` matches
the established cross-component logger-handoff convention (see DI's
sigs for the same pattern); fixing the underlying inconsistency in
Uploader / Extractor / ScopeBatcher sigs is out of scope for this PR.
2. Remote process_change `change` and receiver block's `changes`: revert
to `untyped`. The union type
`Repository::Change::Deleted | ::Inserted | ::Updated` looked right but
Steep cannot narrow the union by the `case change.type` dispatch the
code uses — `.content` exists only on Inserted/Updated, `.previous`
only on Deleted/Updated, so every access through the union flagged.
The runtime dispatch via `.type` symbol matches what the code does
correctly; reverting to `untyped` matches the pattern. (DI's
remote.rbs takes the same approach.)
3. scheduler_loop in component.rb:306: reinstate a per-line
`# steep:ignore NoMethod` on the `@scheduled_at - Time.get_time`
line, with an inline comment explaining that Steep does not narrow
nullable instance variables across an `if @scheduled_at.nil?`
check. Per-line rather than the previously removed block-level
ignore — only one line needs suppression.
Verification:
- bundle exec steep check → No type error detected. (locally, with
libdatadog 33.0.0.1.0 now installed)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 70b18b9 commit ce69f31
3 files changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
307 | 311 | | |
308 | 312 | | |
309 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments