question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

When using Google provider + Python the import generated file get so big that the IDEs can't handle it

See original GitHub issue

Community 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

  1. Install cdktf in your python project
  2. Add google provider
  3. Run cdktf get
  4. 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:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
fbrodrigorezinocommented, Mar 4, 2022

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.

0reactions
github-actions[bot]commented, Nov 24, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found