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
{{ message }}
This repository was archived by the owner on Aug 18, 2022. It is now read-only.
So while making the change to preserve package names exactly without making them more “julian”*, I also deleted the code that made the individual module names unique. Now there is this edge case, when if the leaf module has the same name as to topmost module, you can’t import it because the names would clash (and we have to import it to namespace imported definitions).
There is this vector database, Milvus, which provides a ProtoBuf interface. The current ProtoBuf doesn’t handle it for some reason related to scope resolution, we do generate code that is valid except for one thing: there is a milvus.proto.milvus package used by this file which tried to import the topmost milvus module into the leaf milvus module so that we can reach stuff in milvus.proto.common module. To solve this, I propose:
When importing the topmost module, if the names clash, use an alias for it (i.e. import ...milvus -> import ...milvus as var"#milvus") and make sure that when fully qualifying imported names, we use the alias.
* We want to do this so that parsing fully qualified names from Any types has less runtime overhead.
So while making the change to preserve package names exactly without making them more “julian”*, I also deleted the code that made the individual module names unique. Now there is this edge case, when if the leaf module has the same name as to topmost module, you can’t import it because the names would clash (and we have to import it to namespace imported definitions).
There is this vector database, Milvus, which provides a ProtoBuf interface. The current ProtoBuf doesn’t handle it for some reason related to scope resolution, we do generate code that is valid except for one thing: there is a
milvus.proto.milvus
package used by this file which tried to import the topmostmilvus
module into the leafmilvus
module so that we can reach stuff inmilvus.proto.common
module. To solve this, I propose:When importing the topmost module, if the names clash, use an alias for it (i.e.
import ...milvus
->import ...milvus as var"#milvus"
) and make sure that when fully qualifying imported names, we use the alias.* We want to do this so that parsing fully qualified names from
Any
types has less runtime overhead.Sounds good, @quinnj?
The text was updated successfully, but these errors were encountered: