-
Notifications
You must be signed in to change notification settings - Fork 260
Closed
Labels
bugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.
Description
Describe the bug
Correct me if I'm wrong but won't packageCacheEnabled always be false? Since JSII_RUNTIME_PACKAGE_CACHE is converted to uppercase and compared to a lowercase string literal.
See code here
https://github.com/aws/jsii/blob/main/packages/@jsii/kernel/src/tar-cache/index.ts#L26-L27
Expected Behavior
export JSII_RUNTIME_PACKAGE_CACHE=enabled should enable caching.
Current Behavior
No caching.
after running cdk synth with that env variable
ls: cannot access '/home/myuser/.cache/aws/jsii/package-cache': No such file or directoryReproduction Steps
pip install aws-cdk-lib then cdk synth for a very simple stack in python.
Possible Solution
Change the line of code https://github.com/aws/jsii/blob/main/packages/@jsii/kernel/src/tar-cache/index.ts#L26-L27
- let packageCacheEnabled = process.env.JSII_RUNTIME_PACKAGE_CACHE?.toLocaleUpperCase() === 'enabled'
+ let packageCacheEnabled = process.env.JSII_RUNTIME_PACKAGE_CACHE?.toLocaleLowerCase() === 'enabled'Additional Information/Context
This is using python cdk version 2.59.0
SDK version used
jsii 1.72.0
Environment details (OS name and version, etc.)
Ubuntu 22.04.1 LTS
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.