Tools: Circular imports result in analyze promise never being resolved nor rejected

Created on 11 Nov 2016  路  3Comments  路  Source: Polymer/tools

Title says it all. Seems circular imports result in a stalemate situation where two promises wait for each other to be resolved/rejected which means neither ever are.

analyzer Critical Accepted Bug

Most helpful comment

Thanks for figuring this out. Our circular import handling is definitely not complete.

Circular imports work in HTML Imports, and ES6 modules (though there are caveats around circular dependencies for exports within those graphs), so we'll support them in the analyzer.

All 3 comments

Something to think about:

  • Should circular imports be considered an error condition? Can't find anything in the spec about this but it seems like chrome is least gracefully handling them.
  • Should the analyzer try to resolve circular imports or bail out when it detects them? In any case, it's definitely worth creating a warning.

Thanks for figuring this out. Our circular import handling is definitely not complete.

Circular imports work in HTML Imports, and ES6 modules (though there are caveats around circular dependencies for exports within those graphs), so we'll support them in the analyzer.

Arg, I didn't notice that you'd assigned yourself to this issue, sorry about that, hope I didn't preempt what you were working on.

Was this page helpful?
0 / 5 - 0 ratings