-
Notifications
You must be signed in to change notification settings - Fork 56
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
Generics not working as expected when decorator uses ResolveLocalPath #74
Comments
I have a failing test in #75 and I'm looking for pointers on how to fix it. I'm thinking that I need to inspect |
I haven't worked on this codebase for years so it's definitely possible I'm misunderstanding, but why? What's wrong with treating it as a local type? If you're just trying to identify it as a generic type, then indicating this by having an empty string in the package path seems like a bad idea. e.g. when ResolveLocalPath==false, then you wouldn't be able to tell a generic type from a local type... Or maybe I'm missing something? |
Exactly... Remember, the The path resolving features are only supposed to make it possible to automatically manage the imports block. I feel that having generic types look just like local types will be ok... Let me know what you think! |
I get it. I've implemented a type cache and I can repeatedly go back to the cache to see if a type lives in a context. I just have to keep track of what the context is. I think this issue is still a concern -- using ResolveLocalPath causes type params to be reported incorrectly. Not sure anyone else is using ResolveLocalPath besides myself. I can update my PR to rip out the option if you would like. Or I can just leave it as is and get on with working around my issue. Let me know how you would like to proceed. Thanks! |
Use your work-around for now, but we'll keep the ticket open and if lots of people have the same problem, we'll look at fixing it... I would need to spend a while re-acclimatising myself with the codebase because I haven't worked on this project for years. |
When using a decorator with
ResolveLocalPath
set to true with generics, the path of the generic type is returned as the package where the type is located. I think it should always be empty string.The text was updated successfully, but these errors were encountered: