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

Consider whether we should remove namespace support from jsii #283

Closed
eladb opened this issue Oct 25, 2018 · 4 comments
Closed

Consider whether we should remove namespace support from jsii #283

eladb opened this issue Oct 25, 2018 · 4 comments
Assignees
Labels
effort/medium Medium work item – a couple days of effort feature-request A feature should be added or improved.

Comments

@eladb
Copy link
Contributor

eladb commented Oct 25, 2018

We are seeing issues implementing interfaces in various languages (e.g. python #270). Those are also not considered a very good practice in typescript (aws/aws-cdk#878). Perhaps we should get rid of them in jsii?

@dstufft
Copy link
Contributor

dstufft commented Oct 25, 2018

To be totally clear, the "namespace as a nested class" pattern is generally fine for Python (I don't know about other languages). The issue we've run into is the "pure" namespace like cloudformation.

eladb pushed a commit to aws/aws-cdk that referenced this issue Dec 13, 2018
Rename generated CloudFormation resource constructs from `cloudformation.XxxResource` to `CfnXxx`. This fixes #878 and eliminates the use of namespaces in the CDK.

This is done in a backwards compatible way, which means that we still generate the old resources under the `cloudformation` namespace so we can remove them in a subsequent release. Those resources also include a deprecation warning which is emitted upon `cdk synth`.

Documentation updated to reflect changes.

Related: aws/jsii#283 and aws/jsii#270
@jasdel
Copy link

jasdel commented Feb 8, 2019

Removing this namespaces would prevent issues with language that do not support nested namespaces. If the concept of nested declaration is needed, using a submodule would be more flexible. But jsii should assert no circular module department exist

@eladb
Copy link
Contributor Author

eladb commented Feb 10, 2019

Now that aws/aws-cdk#878 is resolved we can safely remove namespaces from Jsii

@SomayaB SomayaB added the feature-request A feature should be added or improved. label Nov 18, 2019
@RomainMuller RomainMuller added the effort/medium Medium work item – a couple days of effort label Jan 24, 2020
@RomainMuller
Copy link
Contributor

We are going to go the submodules route (see #1286). This means the current namespace support will evolve into something more robust. I'm resolving this in favor of #1286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – a couple days of effort feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

5 participants