-
-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
two imports with the same import-name are not distinguised #145
Comments
@FlorianLudwig |
I just understood that I have to refactor the logic of referencing and resolving classes. |
Thank you so much for your work! Looking forward to it. |
Sorry, I'm busy this week. |
@FlorianLudwig |
Hi @koxudaxi, I just tested Previously:
Now:
All but one enum are gone (diff of generated code: left old version, right after upgrade): And the same enum is used everywhere. Files: edit: link to schema used was the wrong one |
@FlorianLudwig |
Hey @koxudaxi thanks! I tested against current master. Looks good! (It looks like you didn't publish to pypi though) |
@FlorianLudwig
Really? 🤔 |
This is strange. I had the following error with
Not sure what I did wrong, but is working now! |
Describe the bug
I am not yet sure how to reproduce which state, as I have two different observation:
Example 1:
Generated code:
(from: https://github.com/FlorianLudwig/pdk8s/blob/e9b5903c4f8cf584fe60a4a84709a42f7e63b771/pdk8s/gen/io/k8s/api/networking/v1beta1.py#L12)
Example 2:
Generated code:
(from: https://github.com/FlorianLudwig/pdk8s/blob/e9b5903c4f8cf584fe60a4a84709a42f7e63b771/pdk8s/gen/io/k8s/api/extensions/v1beta1.py)
In this example, the second import is renamed to avoid the collision but the references are not. Resulting in code trying to access module members that are in
v1_1
but refer tov1
. (Example)Expected behavior
The second example is a step in the right direction (or maybe import more of the package name, in this example
meta.v1
instead of justv1
). But the references must be updated.Version:
The text was updated successfully, but these errors were encountered: