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

feat: handle nested submodules #1215

Merged
merged 4 commits into from
Nov 21, 2023
Merged

feat: handle nested submodules #1215

merged 4 commits into from
Nov 21, 2023

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Nov 21, 2023

(This is a re-roll of #1190).

jsii-docgen used to assume that submodules only went one level deep,
i.e. that there could not be submodules within submodules. Break that
assumption by doing the following:

  • Use assembly.allSubmodules everywhere assembly.submodules used to
    be used.
  • Address submodules by FQN instead of by name (which only holds the
    last name component).
  • As an exception: documentation.toJson() accepts both FQN as well as
    root-relative name for backwards compatibility.

otaviomacedo and others added 2 commits November 21, 2023 12:10
Allow users to create documentation for nested modules. Suppose a project has the following submodule structure:

```
my-project
└── foo
    └── bar
```

where `foo` and `bar` are submodules. To generate documentation for the `bar` module, call `documentation.toJson('foo.bar')`.
(This is a re-roll of #1190).

`jsii-docgen` used to assume that submodules only went one level deep,
i.e. that there could not be submodules within submodules. Break that
assumption by doing the following:

- Use `assembly.allSubmodules` everywhere `assembly.submodules` used to
  be used.
- Address submodules by FQN instead of by `name` (which only holds the
  last name component).
- As an exception: `documentation.toJson()` accepts both FQN as well as
  root-relative name for backwards compatibility.
@rix0rrr rix0rrr requested a review from a team November 21, 2023 13:12
@mergify mergify bot merged commit d34a513 into main Nov 21, 2023
11 checks passed
@mergify mergify bot deleted the huijbers/both-names branch November 21, 2023 13:28
rix0rrr added a commit to cdklabs/construct-hub that referenced this pull request Nov 21, 2023
Bring in cdklabs/jsii-docgen#1215 which adds
support for nested submodules (`asm.sub1.sub2`), and adjust the code to
match.

Also add S3 throttling protection via retries and backoff, since we have
a fair bit of that going around as well.
github-merge-queue bot pushed a commit to cdklabs/construct-hub that referenced this pull request Nov 21, 2023
Bring in cdklabs/jsii-docgen#1215 which adds
support for nested submodules (`asm.sub1.sub2`), and adjust the code to
match.

Also add S3 throttling protection via retries and backoff, since we have
a fair bit of that going around as well.


----

*By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants