Skip to content

Commit 49badb5

Browse files
author
Elad Ben-Israel
authored
chore: remove reliance on decdk in build system (#18760)
Various pieces in the build system relied in `decdk` as a package that took a dependency on all modules. We removed `decdk` so we need to break this dependency and use `aws-cdk-lib` instead. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent fecd922 commit 49badb5

File tree

7 files changed

+11
-15
lines changed

7 files changed

+11
-15
lines changed

packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,11 @@ async function main() {
295295
await addDependencyToMegaPackage(path.join('@aws-cdk', 'cloudformation-include'), module.packageName, version, ['dependencies', 'peerDependencies']);
296296
await addDependencyToMegaPackage('aws-cdk-lib', module.packageName, version, ['devDependencies']);
297297
await addDependencyToMegaPackage('monocdk', module.packageName, version, ['devDependencies']);
298-
await addDependencyToMegaPackage('decdk', module.packageName, version, ['dependencies']);
299298
}
300299
}
301300

302301
/**
303-
* A few of our packages (e.g., decdk, aws-cdk-lib) require a dependency on every service package.
302+
* A few of our packages (e.g., aws-cdk-lib) require a dependency on every service package.
304303
* This automates adding the dependency (and peer dependency) to the package.json.
305304
*/
306305
async function addDependencyToMegaPackage(megaPackageName: string, packageName: string, version: string, dependencyTypes: string[]) {

packages/@aws-cdk/cfnspec/build-tools/update.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ node ${scriptdir}/create-missing-libraries.js || {
8989
exit 1
9090
}
9191

92-
# update decdk dep list
93-
(cd ${scriptdir}/../../../decdk && node ./deps.js || true)
92+
# update monocdk dep list
9493
(cd ${scriptdir}/../../../monocdk && yarn gen || true)
9594

9695
# append old changelog after new and replace as the last step because otherwise we will not be idempotent

packages/@aws-cdk/cloudformation-include/build.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* This build file has two purposes:
3-
* 1. It adds a dependency on each @aws-cdk/aws-xyz package with L1s to this package,
4-
* similarly to how deps.js does for decdk.
3+
* 1. It adds a dependency on each @aws-cdk/aws-xyz package with L1s to this package.
54
* 2. It generates the file cfn-types-2-classes.json that contains a mapping
65
* between the CloudFormation type and the fully-qualified name of the L1 class,
76
* used in the logic of the CfnInclude class.

scripts/align-version.sh

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ marker=$(node -p "require('./scripts/resolve-version').marker.replace(/\./g, '\\
1919
# Exclude a couple of specific ones that we don't care about.
2020
package_jsons=$(find . -name package.json |\
2121
grep -v node_modules |\
22-
grep -v packages/decdk/test/fixture/package.json |\
2322
grep -v .github/actions/prlinter/package.json)
2423

2524
if grep -l "[^0-9]${marker}" $package_jsons; then

scripts/compile-samples

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# on them you can use this script for quicker feedback.
66
#
77
# This could maybe have been an 'npm run' script, but it's not self-contained
8-
# (needs the "decdk" package to compile against and runs jsii-rosetta from the
8+
# (needs the "aws-cdk-lib" package to compile against and runs jsii-rosetta from the
99
# repo root) so that didn't feel right. For now this is what we have.
1010
set -eu
1111
scriptdir=$(cd $(dirname $0) && pwd)
@@ -23,9 +23,9 @@ for dir in $dirs; do
2323
# Run jsii
2424
npm run build
2525

26-
# Run rosetta against decdk dir, failing on compilation errors
26+
# Run rosetta against aws-cdk-lib dir, failing on compilation errors
2727
node --experimental-worker $scriptdir/../node_modules/.bin/jsii-rosetta \
28-
--directory $scriptdir/../packages/decdk \
28+
--directory $scriptdir/../packages/aws-cdk-lib \
2929
--compile \
3030
--output /dev/null \
3131
--verbose \

scripts/list-deprecated-apis.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class StripDeprecatedPrinter {
4848

4949
async function main(printer) {
5050
const typesystem = new jsiiReflect.TypeSystem();
51-
// Decdk depends on everything, so that's a perfect directory to load as closure
52-
await typesystem.loadNpmDependencies(path.resolve(__dirname, '..', 'packages', 'decdk'), { validate: false });
51+
// aws-cdk-lib depends on everything, so that's a perfect directory to load as closure
52+
await typesystem.loadNpmDependencies(path.resolve(__dirname, '..', 'packages', 'aws-cdk-lib'), { validate: false });
5353

5454
printer.printHeader();
5555

scripts/run-rosetta.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ fi
6262

6363
#----------------------------------------------------------------------
6464

65-
# Compile examples with respect to "decdk" directory, as all packages will
65+
# Compile examples with respect to "aws-cdk-lib" directory, as all packages will
6666
# be symlinked there so they can all be included.
6767
echo "💎 Extracting code samples" >&2
6868
time $ROSETTA extract \
6969
--compile \
7070
--verbose \
7171
--cache ${rosetta_cache_file} \
72-
--directory packages/decdk \
72+
--directory packages/aws-cdk-lib \
7373
${extract_opts} \
7474
$(cat $jsii_pkgs_file)
7575

@@ -82,7 +82,7 @@ if $infuse; then
8282
--compile \
8383
--verbose \
8484
--cache ${rosetta_cache_file} \
85-
--directory packages/decdk \
85+
--directory packages/aws-cdk-lib \
8686
$(cat $jsii_pkgs_file)
8787
fi
8888

0 commit comments

Comments
 (0)