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
After finally extensively using the components system, I noticed that while we create import dependencies of translation units and packages across different components (e.g., file a.py in application uses the package os in stdlib component), we store only this information in the individual components. The list is a sorted list of translation units (for example for the symbol resolver) in ascending order of least-dependencies. While this is useful inside a component to resolve them in the correct order, this does not help us when resolving across components.
For example, if we have the following structure (from above):
application component
a.py imports os (which can be found in stdlib)
b.py imports a (of application)
c.py imports nothing
stdlib component
os.py imports nothing
We would then have a sorted list of units ["c.py", "a.py", "b.py"] for application and ["os.py"] for stdlib. But the order of components is currently not influenced by the information. We can be lucky that we parse stdlib before the application (or not).
Instead, if we would consolidate this information across all components, we would end up with ["os.py", "c.py", "a.py", "b.py"] or ["c.py", "os.py", "a.py", "b.py"] which would provide a better picture.
An even better approach is that, we would need just the information that stdlib needs to be parsed before application. This would allows us to keep the processing of components still separate but do it in the correct order.
The text was updated successfully, but these errors were encountered:
oxisto
changed the title
Consolidate dependencies of namespaces across components
Propagate dependencies of namespaces to components
Jan 30, 2025
oxisto
changed the title
Propagate dependencies of namespaces to components
Propagate import dependencies to components
Jan 30, 2025
After finally extensively using the components system, I noticed that while we create import dependencies of translation units and packages across different components (e.g., file
a.py
inapplication
uses the packageos
instdlib
component), we store only this information in the individual components. The list is a sorted list of translation units (for example for the symbol resolver) in ascending order of least-dependencies. While this is useful inside a component to resolve them in the correct order, this does not help us when resolving across components.For example, if we have the following structure (from above):
application
componenta.py
importsos
(which can be found instdlib
)b.py
importsa
(ofapplication
)c.py
imports nothingstdlib
componentos.py
imports nothingWe would then have a sorted list of units
["c.py", "a.py", "b.py"]
forapplication
and["os.py"]
for stdlib. But the order of components is currently not influenced by the information. We can be lucky that we parse stdlib before the application (or not).Instead, if we would consolidate this information across all components, we would end up with
["os.py", "c.py", "a.py", "b.py"]
or["c.py", "os.py", "a.py", "b.py"]
which would provide a better picture.An even better approach is that, we would need just the information that
stdlib
needs to be parsed beforeapplication
. This would allows us to keep the processing of components still separate but do it in the correct order.The text was updated successfully, but these errors were encountered: