-
Notifications
You must be signed in to change notification settings - Fork 245
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
Submodules #1286
Labels
effort/large
Large work item – several weeks of effort
feature-request
A feature should be added or improved.
Comments
We could add a pacmak.json configuration which would allow for per-package name manipulation as well as any other package-level info needed for other languages but not necessarily for Node/NPM. |
RomainMuller
added a commit
that referenced
this issue
Mar 19, 2020
Introduces a `jsii` *Submodule* feature. *Submodules* are introduced by declaring a `namespace`: ```ts // Using a namespaced export statement export * as ns from './subfolder'; // Using a namespace declaration export ns { // ... } ``` *Submodules* can be nested in other *submodules*, but the dependency graph between submodules (and the top-level module) must not result in a cycle (jsii` does currently **not** check for this particular issue, although it probably will in the future). Although this is out-of-scope for this change, they could be enhanced so a specific `README.md` is attached to them, and so that dedicated code-generating configuration can be specified. Fixes #1286
6 tasks
mergify bot
pushed a commit
that referenced
this issue
May 27, 2020
Introduces a new `.jsiirc.json` file leveraged by sumodules defined using the `export * as namespace from './namespace';` syntax. The `.jsiirc.json` file is a sibling to what `./namespace` resolves to (since this typically resolves to `./namespace/index.ts`, the `.jsiirc.json` file must be at `./namespace/.jsiirc.json`). The `targets` key can je set within this `.jsiirc.json` document and include specific configuration for various targets: ```js { "targets": { "dotnet": { // Only the "namespace" key is considered/supported at this point "namespace": "Some.DotNet.Namespace" }, "java": { // Only the "package" key is considered/supported at this point "package": "some.java.package_name" }, "python": { // Only the "module" key is considered/supported at this point // The configured module name for a submodule _MUST_ be nested // under the root module name for the package. "module": "some.module_name" } } } ``` Related to #1286 --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
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.
🚀 Feature Request
Affected Languages
TypeScript
orJavascript
Python
Java
C#
,F#
, ...)Description
We are looking into releasing the entire AWS CDK as a single module (see aws/aws-cdk-rfcs#122).
In order to be able to organize the namespace of that huge single module we need a way to group types into "submodules".
The current way these types are exported is:
This offers a good experience in TypeScript:
We need this to translate properly to all supported jsii languages.
Proposed Solution
A few things to consider:
@java.package foo.bar.foo
.The text was updated successfully, but these errors were encountered: