Skip to content

Comments

[ty] Rename inner query for better debugging experience#21106

Merged
MichaReiser merged 1 commit intomainfrom
micha/rename-query
Oct 28, 2025
Merged

[ty] Rename inner query for better debugging experience#21106
MichaReiser merged 1 commit intomainfrom
micha/rename-query

Conversation

@MichaReiser
Copy link
Member

Summary

Using an unspecific name like inner makes it difficult to find the problematic query if Salsa panics because the cycle head iterated too many times, or if any other invariant isn't true.

This specific instance came up on #20566 where the Salsa panic only referred to inner.

This PR renames the inner function to use a longer name so that the query's debug name is more self explanatory ;)

Test Plan

The panic message now renders as Cycle recovery function for infer_definition_types(Id(a42f)) introduced a cycle, depending on is_equivalent_to_object_inner(Id(8007)). This is not allowed. which
is more actionable.

@MichaReiser MichaReiser added the internal An internal refactor or improvement label Oct 28, 2025
@MichaReiser MichaReiser requested a review from carljm as a code owner October 28, 2025 11:21
@MichaReiser MichaReiser added the ty Multi-file analysis & type inference label Oct 28, 2025
@MichaReiser MichaReiser enabled auto-merge (squash) October 28, 2025 11:21
@github-actions
Copy link
Contributor

Diagnostic diff on typing conformance tests

No changes detected when running ty on typing conformance tests ✅

@github-actions
Copy link
Contributor

mypy_primer results

No ecosystem changes detected ✅
No memory usage changes detected ✅

@MichaReiser MichaReiser merged commit ae0343f into main Oct 28, 2025
42 checks passed
@MichaReiser MichaReiser deleted the micha/rename-query branch October 28, 2025 11:26
Copy link
Member

@dcreager dcreager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

dcreager added a commit that referenced this pull request Oct 28, 2025
…l-constraint-sets

* dcreager/refactor-constraint-mdtests: (60 commits)
  add static_asserts
  move all reveal diagnostics to separate line
  add more gradual tests
  better comment
  restructure a bit
  better names/comments
  simplify before implication
  two typevars!
  mdformat
  rename mdtest
  move is_subtype_of_given into ConstraintSet
  move where we grab these
  add ConstraintSet.{always,never}
  move range_constraint into ConstraintSet class
  [ty] Rename `inner` query for better debugging experience (#21106)
  [ty] Add new "constraint implication" typing relation (#21010)
  [semantic error tests]: refactor semantic error tests to separate files (#20926)
  Respect `--output-format` with `--watch` (#21097)
  [`pyflakes`] Revert to stable behavior if imports for module lie in alternate branches for `F401` (#20878)
  Fix finding keyword range for clause header after statement ending with semicolon (#21067)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants