You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@JakeWharton I'm starting to work on this feature (generating extension functions).
I would like make sure we're on the same page in terms of the way you would like to have the feature implemented into the library. That's why I'm starting the PR early (without any code), mostly for the discussion purposes.
Base extension functions in a new module (e.g. butterknife-ktx) so it can be used parallely with butterknife or butterknife-reflect
Extension function generation included in the original butterknife-compiler module.
They don't need to be in new modules. The Kotlin dependency can be marked as optional and we can hide the enclosing class from Java callers.
Alright, would you like the base extension functions to works differently for both "modes"? Or the same?
If the base extension function (i.e. Activity.bind()) is called for butterknife, it means that there is something wrong with the extension function generation. Throw exception?
If the base extension function is called for butterknife-reflect everything is correct so we're passing the call for Butterknife.bind(this).
I would call ButterKnife.bind in both cases so that the extension is still usable for code generation from locations where you only have an Activity reference.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a followup of the #1016 issue.
So far it is empty, to figure out details of the implementation.