Conversation
Diagnostic diff on typing conformance testsNo changes detected when running ty on typing conformance tests ✅ |
a697b63 to
9d17c17
Compare
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
invalid-assignment |
0 | 3 | 0 |
unresolved-attribute |
3 | 0 | 0 |
invalid-argument-type |
0 | 0 | 2 |
invalid-return-type |
0 | 0 | 2 |
unsupported-operator |
0 | 0 | 2 |
possibly-missing-attribute |
0 | 0 | 1 |
unused-ignore-comment |
1 | 0 | 0 |
| Total | 4 | 3 | 7 |
CodSpeed Performance ReportMerging #21910 will not alter performanceComparing Summary
Footnotes
|
|
With #21906, this no longer has any impact on our mdtests. Pushing a rebase to see if it has any ecosystem impact worth pursuing. |
|
Ok, this doesn't seem to hurt performance and there are cases in the ecosystem where it helps, so I think it's worth going ahead with. I'll add at least one example from the ecosystem as an mdtest and then put it up for review. |
| false, | ||
| ) | ||
| }; | ||
| if has_divergent_type_in_cycle(previous) && !has_divergent_type_in_cycle(self) { |
There was a problem hiding this comment.
If I remove the !has_divergent_type_in_cycle(self) requirement, we do get an oscillation in mdtest/regression/1377_iteration_count_mismatch.md. So it is possible to oscillate between types containing a Divergent from the current cycle. But it should not be possible to reintroduce a Divergent from the current cycle once it has been eliminated.
|
@mtshiba please take a look and let me know what you think. |
|
Looks good! |
* origin/main: (22 commits) [ty] Allow gradual lower/upper bounds in a constraint set (#21957) [ty] disallow explicit specialization of type variables themselves (#21938) [ty] Improve diagnostics for unsupported binary operations and unsupported augmented assignments (#21947) [ty] update implicit root docs (#21955) [ty] Enable even more goto-definition on inlay hints (#21950) Document known lambda formatting deviations from Black (#21954) [ty] fix hover type on named expression target (#21952) Bump benchmark dependencies (#21951) Keep lambda parameters on one line and parenthesize the body if it expands (#21385) [ty] Improve resolution of absolute imports in tests (#21817) [ty] Support `__all__ += submodule.__all__` [ty] Change frequency of invalid `__all__` debug message [ty] Add `KnownUnion::to_type()` (#21948) [ty] Classify `cls` as class parameter (#21944) [ty] Stabilize rename (#21940) [ty] Ignore `__all__` for document and workspace symbol requests [ty] Attach db to background request handler task (#21941) [ty] Fix outdated version in publish diagnostics after `didChange` (#21943) [ty] avoid fixpoint unioning of types containing current-cycle Divergent (#21910) [ty] improve bad specialization results & error messages (#21840) ...
Partially addresses astral-sh/ty#1732
Summary
Don't union the previous type in fixpoint iteration if the previous type contains a
Divergentfrom the current cycle and the latest type does not. The theory here, as outlined by @mtshiba at astral-sh/ty#1732 (comment), is that oscillation can't occur by removing and then reintroducing aDivergenttype repeatedly, sinceDivergenttypes are only introduced at the start of fixpoint iteration.Test Plan
Removes a
Divergenttype from the added mdtest, doesn't otherwise regress any tests.