Skip to content

[panic] "too many cycle iterations" in robotframework #2637

@DetachHead

Description

@DetachHead

Summary

sorry it's not a minimal repro. i spent like an hour trying to minify this and gave up. i recommend adding robotframework to the primer if it's not there already because its types are so messed up and riddled with circular dependencies. possibly a similar issue to #601?

to reproduce

  1. uv add robotframework
  2. create a file with the following content:
    from robot.running.model import Body
    
    Body.register

output

$ RUST_BACKTRACE=1 ty check pytest_robotframework/__init__.py
error[panic]: Panicked at /root/.cargo/git/checkouts/salsa-e6f3bb7c2a062968/0946cbd/src/function/execute.rs:633:9 when checking `/mnt/4tb-linux/projects/pytest-robotframework/pytest_robotframework/__init__.py`: `StaticClassLiteral < 'db >::inherited_legacy_generic_context_(Id(3c00)): 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.14
info: Args: ["ty", "check", "pytest_robotframework/__init__.py"]
info: Backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: <unknown>
  27: <unknown>
  28: <unknown>
  29: <unknown>
  30: <unknown>
  31: <unknown>
  32: <unknown>
  33: <unknown>
  34: <unknown>
  35: <unknown>
  36: <unknown>
  37: <unknown>
  38: <unknown>
  39: <unknown>
  40: <unknown>
  41: <unknown>
  42: <unknown>
  43: <unknown>
  44: <unknown>
  45: <unknown>
  46: <unknown>
  47: <unknown>
  48: <unknown>
  49: <unknown>
  50: <unknown>
  51: <unknown>
  52: <unknown>
  53: <unknown>
  54: <unknown>
  55: <unknown>
  56: <unknown>
  57: <unknown>
  58: <unknown>
  59: <unknown>
  60: <unknown>
  61: <unknown>
  62: <unknown>
  63: <unknown>
  64: <unknown>
  65: <unknown>
  66: <unknown>
  67: <unknown>
  68: <unknown>
  69: <unknown>
  70: <unknown>
  71: <unknown>
  72: start_thread
             at ./nptl/pthread_create.c:447:8
  73: clone3
             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0

info: query stacktrace:
   0: infer_definition_types(Id(2052))
             at crates/ty_python_semantic/src/types/infer.rs:69
             cycle heads: Type < 'db >::member_lookup_with_policy_(Id(2c02)) -> iteration = 200, StaticClassLiteral < 'db >::explicit_bases_(Id(3c00)) -> iteration = 200
   1: infer_deferred_types(Id(202a))
             at crates/ty_python_semantic/src/types/infer.rs:108
   2: StaticClassLiteral < 'db >::explicit_bases_(Id(3c00))
             at crates/ty_python_semantic/src/types/class.rs:2160
   3: enum_metadata(Id(3c00))
             at crates/ty_python_semantic/src/types/enums.rs:44
   4: Type < 'db >::member_lookup_with_policy_(Id(2c02))
             at crates/ty_python_semantic/src/types.rs:830
   5: infer_scope_types_impl(Id(1000))
             at crates/ty_python_semantic/src/types/infer.rs:186
   6: check_file_impl(Id(c00))
             at crates/ty_project/src/lib.rs:554


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.

Version

0.0.14

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfatala fatal error (panic or crash)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions