mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
show struct dependency cycles in error & update module cycle error (#2517)
This commit is contained in:
parent
f14425ec18
commit
baf49b2523
3 changed files with 30 additions and 23 deletions
|
@ -733,8 +733,7 @@ pub fn (v &V) resolve_deps() &DepGraph {
|
|||
dep_graph.from_import_tables(v.table.file_imports)
|
||||
deps_resolved := dep_graph.resolve()
|
||||
if !deps_resolved.acyclic {
|
||||
deps_resolved.display()
|
||||
verror('import cycle detected')
|
||||
verror('import cycle detected between the following modules: \n' + deps_resolved.display_cycles())
|
||||
}
|
||||
return deps_resolved
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue