Hi all! I’m having trouble with configuration cach...
# caching
a
Hi all! I’m having trouble with configuration cache and environment variables. When updating an environment variable the application gets the previous value if configuration cache is reused. If I start with
--no-configuration-cache
, the application gets the updated value. It’s reproducable from shell and IntelliJ and on other peoples machines, but not in a minimal viable example. Example in shell
Copy code
export SOME_ENV=a_value
./gradlew :project:run
# ctrl + c
export SOME_ENV=new_value
./gradlew :project:run    # application gets SOME_ENV == a_value, both from System.getEnv and ktor environment.config.peroperty (HOCON)
In IntelliJ I edit environment variables in run-configuration and start. Same behaviour. Can mention that when using debug mode in IntelliJ, it does break at a break-point in buildSrc when configuration cache is reused. But if I add
--no-configuration-cache
to the run-configuration, it breaks every time. Have tried
-Dorg.gradle.caching.debug=true
, but could not see anything interesting.
Can mention that I tried forum also, some details about the code there.
v
For a start, you confuse build cache and configuration cache. For configuration cache there is a dedicated #C013WEPGQF9, this is more for build cache.
org.gradle.caching.debug
on the other hand is for build cache, so does not help you in any way regarding any issue with configuration cache. You might get more appropriate attention if you delete your thread here and post it to #C013WEPGQF9 instead.
πŸ‘ 1
Actually, having a fresh look at your forum thread today made me recognize the situation, I answered on the forum. πŸ™‚
πŸ™Œ 1
a
> For configuration cache there is a dedicated #C013WEPGQF9, this is more for build cache. Aha. Wondered about that. Read the title > All things relevant to caching. ..and took all literally. πŸ˜‡
Thanks for you help 😊 I created an issue: https://github.com/gradle/gradle/issues/30790
πŸ‘Œ 1
v
Aha. Wondered about that. Read the title
All things relevant to caching.
..and took all literally. πŸ˜‡
Yeah, that description pre-dates the existence of CC, and it is fine to ask CC questions in here, #C013WEPGQF9 might just be more appropriate and get attention of different people. Maybe @Oleg Nenashev should mention #C013WEPGQF9 in topic of this channel. :-)
πŸ‘ 1
o
Thanks for flagging, I will expedite internally