use Annotations for deprecation warnings
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
cdk synth outputs warnings like so:
```
[WARNING] aws-cdk-lib.aws_iam.GrantOnPrincipalOptions#scope is deprecated.
The scope argument is currently unused.
This API will be removed in the next major release.
```
This tells us nothing about which particular construct is using the deprecated resource. And in this particular case, I have no idea what it is referring to because we don't use `GrantOnPrincipalOptions` directly.
Please redesign deprecation warnings to use CDK's own annotation framework so we can know which particular construct has caused the problem.
Until this is fixed, such warnings are not actionable in a large codebase.
### Use Case
I want to be able to resolve deprecation warnings.
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.250.0
### AWS CDK CLI version
2.1118.4 (build 82715b6)
### Environment details (OS name and version, etc.)
Alpine 3.23
Contributor guide
Research direction
No files or tests are named in the issue. Start by tracing how cdk synth emits deprecation warnings and how CDK's annotation framework is used, then determine how the construct context can flow into those warnings. Done means deprecation output identifies the particular construct responsible and remains actionable in a large codebase.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, devtools, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100