Skip to content

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Dec 1, 2025

We have been starting to get the above error, because of the style of imports we've been using.

If inside aws-cdk-lib we use an import of the form:

import * as iam from 'aws-cdk-lib/aws-iam';

Then we add an index.d.ts file to the set of inputs, despite there being an index.ts right next to it.

This code was being generated by the Grants module generator. Fix it to use a relative import.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…erwrite input file

We have been starting to get the above error, because of the style
of imports we've been using.

If *inside* `aws-cdk-lib` we use an import of the form:

```ts
import * as iam from 'aws-cdk-lib/aws-iam';
```

Then we add an `index.d.ts` file to the set of inputs, despite there
being an `index.ts` right next to it.

Undo that everywhere, and add a linter rule for it.
@rix0rrr rix0rrr requested a review from a team December 1, 2025 15:37
@aws-cdk-automation aws-cdk-automation requested a review from a team December 1, 2025 15:37
@github-actions github-actions bot added the p2 label Dec 1, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 1, 2025
@rix0rrr rix0rrr changed the title chore: cannot write file '.../aws-iam/index.d.ts' because it would overwrite input file chore: cannot write file 'aws-iam/index.d.ts' because it would overwrite input file Dec 1, 2025
@mergify
Copy link
Contributor

mergify bot commented Dec 1, 2025

Merge Queue Status Beta

✅ The pull request has been merged

This pull request spent 42 minutes in the queue, including 39 minutes 15 seconds waiting for CI.
The checks were run in-place.

Required conditions to merge

@mergify
Copy link
Contributor

mergify bot commented Dec 1, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Dec 1, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit aac81c9 into main Dec 1, 2025
17 of 18 checks passed
@mergify mergify bot deleted the huijbers/cannot-import branch December 1, 2025 17:00
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants