ty icon indicating copy to clipboard operation
ty copied to clipboard

Split the `ty_python_semantic` into more crates

Open MichaReiser opened this issue 4 weeks ago • 0 comments

The ty_python_semantic crates has become pretty big and slow to compile. Splitting the type inference logic is tricky but we could try:

  • Extract the module resolver into ty_module_resolver:
    • Create a new Db in the resolver crate with a search_paths method (to remove the dependency on Program)
    • Create a new TestDb for the module resolver
    • Create a SearchPathBuilder to replace Program::from_settings.
    • I'm sure there are some more wrinkles to it
  • Extract ty_python_infer for the type inference logic. This seems much trickier. Not sure if it's worth it

MichaReiser avatar Dec 19 '25 20:12 MichaReiser