chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Bug][DX]: New EF refactor breaks static analysis of imports for IDEs

Open tazarov opened this issue 1 year ago • 4 comments

What happened?

The new refactoring of the EFs with dynamic imports #2034 breaks IDEs static analysis for imports. The dynamic imports work fine at runtime.

PyCharm

image

VSCode

image

Google Colab

Legacy import:

Screenshot 2024-06-21 at 11 00 52

**New Import from EF file: ** Screenshot 2024-06-21 at 11 00 28

Versions

Chroma@main

Relevant log output

No response

tazarov avatar Jun 21 '24 08:06 tazarov

cc @atroyn and @nablabits

tazarov avatar Jun 21 '24 15:06 tazarov

This is probably happening because of the way we do dynamic imports. I agree it's a bad user experience. @tazarov if you can take some time to see how this can be improved while retaining dynamic importing, that would be helpful. Maybe we need to populate __all__ ?

atroyn avatar Jun 21 '24 22:06 atroyn

@tazarov lmk if you can take a look! :)

jeffchuber avatar Jun 24 '24 12:06 jeffchuber

I'll have the PR up shortly.

tazarov avatar Jun 24 '24 13:06 tazarov

closing this issue, supported in 1.0b0

jairad26 avatar Mar 31 '25 20:03 jairad26