-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rosetta): fails on "Debug Failure" (#2917)
In cases where a literate source file was missing, the substitution value was not valid TypeScript, which could cause the comipler to fail on an opaque error (`Debug Failure`). This falls back to the visible code for the snippet instead of inserting a placeholder, and also makes sure to rescue the `Debug Failure` where it is emitted from, that is in the call to `program.getDeclarationDiagnostics`. Both of this changes result in greater chances of transliteration success. Related to cdklabs/jsii-docgen#369 --- 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
- Loading branch information
1 parent
9d554ed
commit f6078ef
Showing
5 changed files
with
239 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.