Skip to content

chore: split the member test out of _traceDroppedRedeclarations - #3404

Open
momo-bee wants to merge 1 commit into
aws:preview/v7.1from
momo-bee:simplify-trace-dropped-redeclarations
Open

momo-bee wants to merge 1 commit into
aws:preview/v7.1from
momo-bee:simplify-trace-dropped-redeclarations

Conversation

@momo-bee

@momo-bee momo-bee commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

_traceDroppedRedeclarations had a cyclomatic complexity of 24. It decided whether an erased base's member was overridden by a kept member, and it also wrote the log lines.

_droppedRedeclaration now decides. It returns the member's kind and name when a closer member of the same name and kind is kept. The kind table became _memberKind, a switch. The loop only writes the log lines, in the same order. The highest complexity is now 13.

  • Full jest passes on Node 26 with coverage (functions 96.61%).
  • jsii-calc (all modes, including the -vvv trace that this code writes) and aws-cdk-lib (plain, --add-deprecation-warnings, --strip-deprecated) are byte-identical, logs included.
  • aws-cdk-lib, 4 paired runs: median 50.99s -> 50.77s (gaps -0.03, -0.17, +0.46, -0.67s), the same.

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.

1 participant