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

chore: remove reliance on decdk in build system #18760

Merged
merged 1 commit into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,11 @@ async function main() {
await addDependencyToMegaPackage(path.join('@aws-cdk', 'cloudformation-include'), module.packageName, version, ['dependencies', 'peerDependencies']);
await addDependencyToMegaPackage('aws-cdk-lib', module.packageName, version, ['devDependencies']);
await addDependencyToMegaPackage('monocdk', module.packageName, version, ['devDependencies']);
await addDependencyToMegaPackage('decdk', module.packageName, version, ['dependencies']);
}
}

/**
* A few of our packages (e.g., decdk, aws-cdk-lib) require a dependency on every service package.
* A few of our packages (e.g., aws-cdk-lib) require a dependency on every service package.
* This automates adding the dependency (and peer dependency) to the package.json.
*/
async function addDependencyToMegaPackage(megaPackageName: string, packageName: string, version: string, dependencyTypes: string[]) {
Expand Down
3 changes: 1 addition & 2 deletions packages/@aws-cdk/cfnspec/build-tools/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ node ${scriptdir}/create-missing-libraries.js || {
exit 1
}

# update decdk dep list
(cd ${scriptdir}/../../../decdk && node ./deps.js || true)
# update monocdk dep list
(cd ${scriptdir}/../../../monocdk && yarn gen || true)

# append old changelog after new and replace as the last step because otherwise we will not be idempotent
Expand Down
3 changes: 1 addition & 2 deletions packages/@aws-cdk/cloudformation-include/build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* This build file has two purposes:
* 1. It adds a dependency on each @aws-cdk/aws-xyz package with L1s to this package,
* similarly to how deps.js does for decdk.
* 1. It adds a dependency on each @aws-cdk/aws-xyz package with L1s to this package.
* 2. It generates the file cfn-types-2-classes.json that contains a mapping
* between the CloudFormation type and the fully-qualified name of the L1 class,
* used in the logic of the CfnInclude class.
Expand Down
1 change: 0 additions & 1 deletion scripts/align-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ marker=$(node -p "require('./scripts/resolve-version').marker.replace(/\./g, '\\
# Exclude a couple of specific ones that we don't care about.
package_jsons=$(find . -name package.json |\
grep -v node_modules |\
grep -v packages/decdk/test/fixture/package.json |\
grep -v .github/actions/prlinter/package.json)

if grep -l "[^0-9]${marker}" $package_jsons; then
Expand Down
6 changes: 3 additions & 3 deletions scripts/compile-samples
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# on them you can use this script for quicker feedback.
#
# This could maybe have been an 'npm run' script, but it's not self-contained
# (needs the "decdk" package to compile against and runs jsii-rosetta from the
# (needs the "aws-cdk-lib" package to compile against and runs jsii-rosetta from the
# repo root) so that didn't feel right. For now this is what we have.
set -eu
scriptdir=$(cd $(dirname $0) && pwd)
Expand All @@ -23,9 +23,9 @@ for dir in $dirs; do
# Run jsii
npm run build

# Run rosetta against decdk dir, failing on compilation errors
# Run rosetta against aws-cdk-lib dir, failing on compilation errors
node --experimental-worker $scriptdir/../node_modules/.bin/jsii-rosetta \
--directory $scriptdir/../packages/decdk \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rix0rrr will this work?

--directory $scriptdir/../packages/aws-cdk-lib \
--compile \
--output /dev/null \
--verbose \
Expand Down
4 changes: 2 additions & 2 deletions scripts/list-deprecated-apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class StripDeprecatedPrinter {

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rix0rrr will this work?


printer.printHeader();

Expand Down
6 changes: 3 additions & 3 deletions scripts/run-rosetta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ fi

#----------------------------------------------------------------------

# Compile examples with respect to "decdk" directory, as all packages will
# Compile examples with respect to "aws-cdk-lib" directory, as all packages will
# be symlinked there so they can all be included.
echo "💎 Extracting code samples" >&2
time $ROSETTA extract \
--compile \
--verbose \
--cache ${rosetta_cache_file} \
--directory packages/decdk \
--directory packages/aws-cdk-lib \
Copy link
Contributor Author

@eladb eladb Feb 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rix0rrr will this work? Also - how come this did not break our release last week?

${extract_opts} \
$(cat $jsii_pkgs_file)

Expand All @@ -82,7 +82,7 @@ if $infuse; then
--compile \
--verbose \
--cache ${rosetta_cache_file} \
--directory packages/decdk \
--directory packages/aws-cdk-lib \
$(cat $jsii_pkgs_file)
fi

Expand Down