square / square/wire

`WireTask` should use FileCollection instead of `List<String>`

Open
#2,006 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The WireTask should use FileCollection instead of List<String> as a property so that the relative path of the file can be used instead of the full directory as a string. This would allow for more cache hits. The property should be annotated with RelativePath normalization. This would be the case for the targets property and the inputFiles property.

See the cache miss below.
Screen Shot 2021-06-29 at 10 45 38 AM

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

Locate the WireTask entry point and inspect its targets and inputFiles properties, including how their cache inputs are declared. Check the FileCollection and RelativePath normalization APIs before changing the property representation. Done means both properties use the requested normalized file collections and the reported cache miss is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.