You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[case testAddedSubStar]
# cmd: mypy -m a pack pack.mod b
# cmd2: mypy -m other
[file a.py]
from pack import *
[file pack/__init__.py]
[file pack/mod.py]
[file b.py]
import pack.mod
[file other.py]
import a
[out]
[out2]
crashes with
/Users/ilevkivskyi/src/mypy/mypy/build.py:157: in build
result = _build(sources, options, alt_lib_path, flush_errors, fscache)
/Users/ilevkivskyi/src/mypy/mypy/build.py:207: in _build
graph = dispatch(sources, manager)
/Users/ilevkivskyi/src/mypy/mypy/build.py:2214: in dispatch
process_graph(graph, manager)
/Users/ilevkivskyi/src/mypy/mypy/build.py:2505: in process_graph
process_fresh_modules(graph, prev_scc, manager)
/Users/ilevkivskyi/src/mypy/mypy/build.py:2591: in process_fresh_modules
graph[id].fix_cross_refs()
/Users/ilevkivskyi/src/mypy/mypy/build.py:1598: in fix_cross_refs
self.options.use_fine_grained_cache)
/Users/ilevkivskyi/src/mypy/mypy/fixup.py:25: in fixup_module
node_fixer.visit_symbol_table(tree.names)
/Users/ilevkivskyi/src/mypy/mypy/fixup.py:77: in visit_symbol_table
self.quick_and_dirty)
/Users/ilevkivskyi/src/mypy/mypy/fixup.py:261: in lookup_qualified_stnode
return lookup_fully_qualified(name, modules, raise_on_missing=not quick_and_dirty)
/Users/ilevkivskyi/src/mypy/mypy/lookup.py:47: in lookup_fully_qualified
assert key in names, "Cannot find %s for %s" % (key, name)
AssertionError: Cannot find mod for pack.mod
I think this is high priority because the crash affects users who adds new files to typed builds in existing code bases. There must be another way to reproduce this where all files from first command are also present in the second, but I didn't find a simple version of it.
Anyway, the crux seems to be the interference between lack of dependencies from star import (that can also import modules), and add_submodules_to_parent_modules().
The text was updated successfully, but these errors were encountered:
This test case:
crashes with
I think this is high priority because the crash affects users who adds new files to typed builds in existing code bases. There must be another way to reproduce this where all files from first command are also present in the second, but I didn't find a simple version of it.
Anyway, the crux seems to be the interference between lack of dependencies from star import (that can also import modules), and
add_submodules_to_parent_modules()
.The text was updated successfully, but these errors were encountered: