square / square/wire

Project dependencies don't invalidate properly in the configuration cache

Open
#2,815 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
4.4k
Forks
627
Avg merge
3d 15m
Merged PRs (30d)
20

Description

I’m using the Wire Gradle plugin and the Gradle configuration cache.

My Wire build includes this syntax:

  sourcePath {
    srcProject(":upstream-protos")
    include("file_a.proto")
    include("file_b.proto")
  }

Unfortunately when I make changes to upstream-protos my Wire project doesn’t rebuild enough, and produces an incorrect compilation result.

In the interim I’m using this to workaround:

    tasks.withType<WireTask> {
      notCompatibleWithConfigurationCache("Project dependencies don't invalidate properly")
    }

I can also use --no-configuration-cache as a workaround, but that’s more severe.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the configuration-cache behavior with the Wire Gradle plugin, the sourcePath block, and the upstream-protos project described here. Trace how WireTask records the project dependency and compare builds with and without configuration cache. Done means changes in upstream-protos invalidate the relevant Wire work and prevent stale compilation results without requiring the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.