square / square/wire

Intelligent loading

Open
#3,138 0 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

If only precise roots are defined, namely without wildcards, instead of loading everything and parsing everything part on the proto source/path, once Wire found the type, it could do a kinda breadth search going through the imports of the proto file where the roots were found.
Another approach would be to, regardless of the roots, define "include roots" that Wire has to load. Then if necessary, it would go through the imports to resolve the type it wants to resolve.

The point would be that someone would not have to define in includes all the files that are required to load a schema, but at the same time without having Wire to load the whole proto source because if too big, it takes a lot of time.

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

The issue names no files, tests, or entry points. Start by tracing how Wire loads proto sources, applies precise roots and includes, and follows imports; compare import traversal with explicit include roots. Done means required imported types resolve without loading and parsing the entire proto source.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.