https://github.com/staktrace/wire-bug-20240226-cc
Reproducer for a wire configuration caching bug
https://github.com/staktrace/wire-bug-20240226-cc
Last synced: about 1 month ago
JSON representation
Reproducer for a wire configuration caching bug
- Host: GitHub
- URL: https://github.com/staktrace/wire-bug-20240226-cc
- Owner: staktrace
- Created: 2024-02-26T17:42:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-04T15:53:15.000Z (about 2 years ago)
- Last Synced: 2025-03-19T04:43:20.902Z (over 1 year ago)
- Language: Shell
- Homepage: https://github.com/square/wire/issues/2837
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Steps to reproduce
==================
1. Clone this repo
2. Run `bin/gradle clean generateMainProtos`
Expected: build passes
Actual: build fails with error:
```
* What went wrong:
Execution failed for task ':generateMainProtos'.
> unable to find period.proto
searching 0 proto paths:
for file /Users/kartikaya/zspace/wire-bugs/20240226-cc/src/main/proto/dinosaur.proto
unable to resolve Period
for field period (/Users/kartikaya/zspace/wire-bugs/20240226-cc/src/main/proto/dinosaur.proto:6:3)
in message Dinosaur (/Users/kartikaya/zspace/wire-bugs/20240226-cc/src/main/proto/dinosaur.proto:5:1)
```
Workarounds
===========
1. Disable configuration caching in `gradle.properties`. Then the build passes.
2. In the build.gradle.kts file, add `tasks.matching { it.name == "generateMainProtos" }.configureEach { notCompatibleWithConfigurationCache("wiretask not cc-compatible") }`. Then the build passes.
3. Downgrade `gradle` by running `bin/hermit install gradle-7.6.3`. Also then the build passes.
Theories
========
- WireTask is not configuration-cache compatible, at least in gradle 8.6 and other versions of gradle 8+.
- This is likely related to https://github.com/square/wire/issues/2815
Notes
=====
This repo uses hermit to manage tooling, so that everybody running it gets the same tool versions. You can add a gradle wrapper if you like, you should get the same results using that.