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
The following text in dartLangSpec.tex makes it an error for a library (in particular: a program, because this rule applies to all libraries including entry points) to have two or more distinct libraries L1 and L2 in the transitive import closure such that both L1 and L2 have the same part in a part of directive:
Furthermore,
let $L_1$ be $L$ or any library which is directly or indirectly imported by $L$,
and let $L_2$ be any library distinct from $L_1$ which is directly or indirectly imported by $L$
(\ref{imports}).
It is a compile-time error if $L_1$ and $L_2$ both contain a part directive with the same URI.
This is not sufficient to achieve the intended goal, because we should cover "all parts of a program", but it is possible for a library to export another library without importing it, and this means that we can have a part of a program which is never imported by any other library.
We may be able to fix this by defining a notion of 'library dependencies' along the lines of this: L1 er library dependent on L2 if L1 imports L2 or L1 imports L3 and L3 exports L2.
Using the transitive closure of library dependent should then suffice.
The text was updated successfully, but these errors were encountered:
The following text in dartLangSpec.tex makes it an error for a library (in particular: a program, because this rule applies to all libraries including entry points) to have two or more distinct libraries L1 and L2 in the transitive import closure such that both L1 and L2 have the same part in a
part of
directive:This is not sufficient to achieve the intended goal, because we should cover "all parts of a program", but it is possible for a library to export another library without importing it, and this means that we can have a part of a program which is never imported by any other library.
We may be able to fix this by defining a notion of 'library dependencies' along the lines of this:
L1 er library dependent on L2 if L1 imports L2 or L1 imports L3 and L3 exports L2.
Using the transitive closure of library dependent should then suffice.
The text was updated successfully, but these errors were encountered: