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 directory
Reproduction 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
Describe the bug
Correct me if I'm wrong but won't
packageCacheEnabledalways be false? SinceJSII_RUNTIME_PACKAGE_CACHEis 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=enabledshould enable caching.Current Behavior
No caching.
after running cdk synth with that env variable
Reproduction Steps
pip install aws-cdk-libthencdk synthfor 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
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