-
Notifications
You must be signed in to change notification settings - Fork 275
[panic] new panic in 0.0.23 #3057
Copy link
Copy link
Closed
astral-sh/ruff
#24006Labels
bugSomething isn't workingSomething isn't workingfatala fatal error (panic or crash)a fatal error (panic or crash)
Milestone
Description
Following the request in the error message to report a new panic!
Code is the minimal repro I created from our real codebase
File: ./ty_repro.py:
"""
# ty --version
ty 0.0.23
error[panic]: Panicked at /root/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/53421c2/src/function/execute.rs:633:9 when checking `/mnt/pinboard/ty_repro.py`: `infer_expression_type_impl(Id(1c01)): execute: too many cycle iterations`
info: This indicates a bug in ty.
info: If you could open an issue at https://github.com/astral-sh/ty/issues/new?title=%5Bpanic%5D, we'd be very appreciative!
info: Platform: linux x86_64
info: Version: 0.0.23
info: Args: ["ty", "check", "./ty_repro.py"]
info: run with `RUST_BACKTRACE=1` environment variable to show the full backtrace information
info: query stacktrace:
0: infer_expression_types_impl(Id(1c02))
at crates/ty_python_semantic/src/types/infer.rs:224
1: infer_unpack_types(Id(2000))
at crates/ty_python_semantic/src/types/infer.rs:438
2: infer_definition_types(Id(1409))
at crates/ty_python_semantic/src/types/infer.rs:70
3: infer_expression_types_impl(Id(1c03))
at crates/ty_python_semantic/src/types/infer.rs:224
4: infer_expression_type_impl(Id(1c03))
at crates/ty_python_semantic/src/types/infer.rs:299
5: infer_expression_types_impl(Id(1c04))
at crates/ty_python_semantic/src/types/infer.rs:224
6: infer_expression_types_impl(Id(1c05))
at crates/ty_python_semantic/src/types/infer.rs:224
7: infer_expression_type_impl(Id(1c05))
at crates/ty_python_semantic/src/types/infer.rs:299
8: loop_header_reachability(Id(1406))
at crates/ty_python_semantic/src/place.rs:1148
9: infer_expression_types_impl(Id(1c01))
at crates/ty_python_semantic/src/types/infer.rs:224
10: infer_scope_types_impl(Id(1002))
at crates/ty_python_semantic/src/types/infer.rs:187
11: check_file_impl(Id(c00))
at crates/ty_project/src/lib.rs:594
Found 1 diagnostic
WARN A fatal error occurred while checking some files. Not all project files were analyzed. See the diagnostics list above for details.
"""
def fetch(req) -> tuple:
return (True, None)
def paginate():
bookmark = None
while True:
if bookmark is None:
req = None
else:
req = bookmark
ok, next_bookmark = fetch(req)
if not ok:
return
bookmark = next_bookmark
if bookmark is None or bookmark == 0:
breakty check ty_repro.py
Note: repros with no ty.toml or pyproject.toml present at all, so i did not include any config here
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfatala fatal error (panic or crash)a fatal error (panic or crash)