When using Google provider + Python the import generated file get so big that the IDEs can't handle it
See original GitHub issueCommunity Note
- Please vote on this issue by adding a š reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave ā+1ā or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
cdktf & Language Versions
Language: Python Version: All
Affected Resource(s)
Developer experience.
Expected Behavior
When you install the google
provider, you can use it like any other python package.
Actual Behavior
The contact of the imported __init__.py
is so big, that IDEs canāt read the symbols, so we donāt have any code hint.
Steps to Reproduce
- Install cdktf in your python project
- Add
google
provider - Run cdktf get
- Open PyCharm, and try to use the generated classes.
Important Factoids
This is not a problem in the cdktf itself. But how jsii generated python packages. Iām posting it here, as I think terraform would be interested in collaborating to jsii development and solve it.
You can find extra information here: https://github.com/aws/jsii/issues/2436
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Python import: Advanced Techniques and Tips
In this tutorial, you'll learn how to: Use modules, packages, and namespace packages; Handle resources and data files inside your packages; Import modulesĀ ......
Read more >Protocol Buffer Basics: Python - Google Developers
The generated class provides getters and setters for the fields that make up a protocol buffer and takes care of the details of...
Read more >Google Python Style Guide
This style guide is a list of dos and don'ts for Python programs. To help you format code correctly, we've created a settings...
Read more >2. Writing the Setup Script ā Python 3.11.1 documentation
The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the...
Read more >python - What is __init__.py for? - Stack Overflow
You should get an AttributeError (because it is importing your blank file now). If you were to repeat these steps without creating the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
JetBrains IDEs by default donāt support files with more than 25MB. So the experience gets very poor for CDKTF for a variety of providers. Given the number of users of this IDE, it might be smart as product management to improve the support for it.
Another thing, though in VS Code it āworksā for me itās been very slow and very very memory-consuming, so Iād say thatās far from a nice experience.
Iām going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If youāve found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.