Skip to content
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

Split Generated Code into Multiple Files #2436

Open
2 of 5 tasks
skorfmann opened this issue Jan 19, 2021 · 2 comments
Open
2 of 5 tasks

Split Generated Code into Multiple Files #2436

skorfmann opened this issue Jan 19, 2021 · 2 comments
Labels
effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. p2

Comments

@skorfmann
Copy link
Contributor

🚀 Feature Request

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java (haven't checked)
  • .NET (C#, F#, ...) (haven't checked)

General Information

  • JSII Version: 1.17
  • I may be able to implement this feature request

Description

The cdktf provider for AWS generates a 19 MB __init__.py file which contains all the classes for the Terraform AWS Provider. You can check it with this project which publishes a prebuilt PyPi package.

According to this issue, this might lead to a subpar development experience in certain IDEs. At least in PyCharm, it doesn't work out of the box. After setting custom indexing settings for intellisense it seems to work, but the indexing process is still slow. I don't know how other IDEs are behaving.

Copied from the issue:

Change the system property idea.max.intellisense.filesize (https://www.jetbrains.com/help/pycharm/tuning-the-ide.html#configure-platform-properties) to enable intellisense for the imports.aws module, but notice how slow the indexing operation is, because of the large file size.

Proposed Solution

Without having looked at this in detail, one option could be to somehow provide an option to create submodules for each input class / namespace. Is this possible already, can't really tell from the docs?

This is possibly related to #1919

@skorfmann skorfmann added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 19, 2021
@RomainMuller
Copy link
Contributor

I've actually been thinking about this a lot recently, and I sure am very favorable to this idea.

I'm not sure when we'll have time to work on this however... I'll gladly review any PR to this effect 😉

@RomainMuller RomainMuller added effort/large Large work item – several weeks of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Mar 5, 2021
@RomainMuller RomainMuller removed their assignment Jun 24, 2021
@fbrodrigorezino
Copy link

fbrodrigorezino commented Mar 1, 2022

Cannot adopt cdktf here, as python just became irresponsive.Looking forward to this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

3 participants