Skip to content

Maintaining reference to System.getProperties() in PlatformHelper breaks configuration cache in Gradle 7.4-rc1 #209

Closed
@nhoughto

Description

@nhoughto

I get this error when trying to run nodeSetup with --configuration-cache enabled:

org.gradle.api.GradleException: Could not load the value of field `props` of `com.github.gradle.node.util.PlatformHelper` bean found in field `platformHelper` of `com.github.gradle.node.variant.VariantComputer` bean found in field `variantComputer` of task `:g

Based on https://docs.gradle.org/7.4-rc-1/userguide/configuration_cache.html#config_cache:troubleshooting it appears to be related to maintaining a reference to System.getProperties() that is different across gradle executions, and also has some special wrapping in 7.4+ to auto-detect system property usages.

Not keeping a reference to it and looking it up each time might be the answer? 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions