Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change addDependsOn to addDependency #52

Conversation

hlascelles
Copy link
Contributor

addDependsOn is deprecated:

❯ yarn cdk synth
info: Preparing App...
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
  use addDependency
  This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
  use addDependency
  This API will be removed in the next major release.

addDependsOn is deprecated:

```
❯ yarn cdk synth
info: Preparing App...
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
  use addDependency
  This API will be removed in the next major release.
[WARNING] aws-cdk-lib.CfnResource#addDependsOn is deprecated.
  use addDependency
  This API will be removed in the next major release.
```
@blimmer blimmer changed the title Change addDependsOn to addDependency fix: Change addDependsOn to addDependency Jun 2, 2023
@blimmer
Copy link
Owner

blimmer commented Jun 2, 2023

Hey @hlascelles - thanks for this PR. As you can see from the build failure, this change will also require an update to the minimum version of CDK v2. Currently, that's 2.1.0:

cdkVersion: '2.1.0',

2.1.0 is quite old, so I think it's safe to bump to the minimum version of CDK that supports addDependency. You'll need to look in the changelogs to see when that was released and make the appropriate update.

Thanks for your contribution!

@hlascelles
Copy link
Contributor Author

👍 Looks like v2.56.0 aws/aws-cdk@ecedb00

@blimmer
Copy link
Owner

blimmer commented Jun 2, 2023

Since this uses projen, you'll need to update the version in projenrc.js (linked in my comment above) and then run yarn projen. Commit the result and we can run the test suite. Thanks!

@hlascelles
Copy link
Contributor Author

hlascelles commented Jun 3, 2023

I struggled to do a yarn install as I get errors:

➤ YN0066: │ typescript@patch:typescript@npm%3A4.8.3#builtin<compat/typescript>::version=4.8.3&hash=8133ad: Cannot apply hunk #2 (set enableInlineHunks for details)
➤ YN0000: └ Completed in 11s 770ms
➤ YN0000: Failed with errors in 22s 702ms

Then if I try yarn set version latest I think I get further, but then yarn projen (with the new library version) gives Unknown Syntax Error: Unsupported option name ("--check-files").

I must admit this is all beyond my ken. I can't proceed this PR further, sorry!

@blimmer
Copy link
Owner

blimmer commented Jun 3, 2023

Fixed by #54 - I explained the changes over there. Thanks for your contribution! I'll close this PR in favor of the other one.

@blimmer blimmer closed this Jun 3, 2023
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.

2 participants