Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Gradle, CLI options to load exhaustively #3254

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

damianw
Copy link
Contributor

@damianw damianw commented Jan 21, 2025

This PR adds a flag to the CLI and setting to the Gradle plugin to enable the loadExhaustively option.

It's currently not possible to correctly implement certain custom schema handlers without this option. In our case, we are using the Google API HTTP options, which introduce options that can refer to fields by nested path (e.g. field1.nestedField.anotherField). By default, Wire may not link fields referenced by such options.

An ideal solution might be some kind of API to tell Wire about additional types/fields/etc that need to be linked, but I don't know how possible that is. In the meantime, exposing this option unblocks implementing schema handlers that use options in this way.

Another use-case can be seen in #2748.

@damianw damianw marked this pull request as ready for review January 21, 2025 19:23
Copy link
Member

@oldergod oldergod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but needs one test

@damianw damianw requested a review from oldergod January 21, 2025 22:09
@oldergod oldergod merged commit 2b59490 into square:master Jan 23, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants