Skip to content

Commit

Permalink
fix: remove the "comments rewriter" (#3368)
Browse files Browse the repository at this point in the history
The comments rewriter was used to prefix documentation comments with the
stability level of the associated API (e.g: `(experimental)` or
`(deprecated)`). This was introduced to palliate insufficient IDE
support for `@deprecated` and the mixing of `@stable` and
`@experimental` APIs in CDK v1.

Since then, the TypeScript language server has added support for
`@deprecated` IDE features, and CDK v2 moved all `@experimental` APIs to
separate packages, removing the risk for people to inadvertently take
experimental dependencies.

In profiling, this feature alone was attributed between 50% and 60% of
the total time spent compiling `aws-cdk-lib`. The impact is likely
comparable on other large construct libraries.

The benefits from this feature are not sufficient to justify the cost to
make it happen. Instead of trying to optimize it (which could prove
impossible), decision was made to simply drop it.



---

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
RomainMuller committed Feb 7, 2022
1 parent 4d15b5c commit 50dd3b0
Show file tree
Hide file tree
Showing 12 changed files with 300 additions and 753 deletions.
26 changes: 13 additions & 13 deletions packages/jsii-calc/test/assembly.jsii
Expand Up @@ -761,7 +761,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) String representation of the value."
"summary": "String representation of the value."
},
"locationInModule": {
"filename": "lib/calculator.ts",
Expand All @@ -781,7 +781,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) The value."
"summary": "The value."
},
"immutable": true,
"locationInModule": {
Expand Down Expand Up @@ -1772,7 +1772,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) Say hello!"
"summary": "Say hello!"
},
"locationInModule": {
"filename": "lib/calculator.ts",
Expand Down Expand Up @@ -4764,7 +4764,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) Say hello!"
"summary": "Say hello!"
},
"locationInModule": {
"filename": "lib/compliance.ts",
Expand Down Expand Up @@ -9364,7 +9364,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) String representation of the value."
"summary": "String representation of the value."
},
"locationInModule": {
"filename": "lib/calculator.ts",
Expand All @@ -9384,7 +9384,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) The value."
"summary": "The value."
},
"immutable": true,
"locationInModule": {
Expand Down Expand Up @@ -9471,7 +9471,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) Say hello!"
"summary": "Say hello!"
},
"locationInModule": {
"filename": "lib/calculator.ts",
Expand All @@ -9488,7 +9488,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) String representation of the value."
"summary": "String representation of the value."
},
"locationInModule": {
"filename": "lib/calculator.ts",
Expand All @@ -9508,7 +9508,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) The value."
"summary": "The value."
},
"immutable": true,
"locationInModule": {
Expand Down Expand Up @@ -14787,7 +14787,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) String representation of the value."
"summary": "String representation of the value."
},
"locationInModule": {
"filename": "lib/calculator.ts",
Expand Down Expand Up @@ -14825,7 +14825,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) The value."
"summary": "The value."
},
"immutable": true,
"locationInModule": {
Expand Down Expand Up @@ -15075,7 +15075,7 @@
{
"docs": {
"stability": "stable",
"summary": "(deprecated) Say hello!"
"summary": "Say hello!"
},
"locationInModule": {
"filename": "lib/module2647/index.ts",
Expand Down Expand Up @@ -16807,5 +16807,5 @@
}
},
"version": "3.20.120",
"fingerprint": "w6AJ35Nh9lBusQyMGP28WJp5MNbg527uO9TsHaP+DiE="
"fingerprint": "lt+IM5wKyCp+HghCCEt9CX5x65ePqyHvu/emNzsxqbg="
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 50dd3b0

Please sign in to comment.