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

Automatic Parceler support #56

Open
bryant1410 opened this issue May 4, 2016 · 3 comments
Open

Automatic Parceler support #56

bryant1410 opened this issue May 4, 2016 · 3 comments

Comments

@bryant1410
Copy link
Contributor

@Arg(bundler = ParcelerArgsBundler.class) has to be used with bundler-parceler, doesn't it? Maybe an approach can be taken in which it automatically detects that @Parcel is present in the class, as in Dart.

@sockeqwe
Copy link
Owner

sockeqwe commented May 5, 2016

Yes, that could be done, but I didn't wanted to depend on a third party library like Parceler.
The reason is that every time Parceler makes a release with breaking changes or new features, FragmentArgs must be updated and released too. So that might not be the biggest issue with only Parceler integration, but imagine that there are 4 more other third party libraries integrated in FragmentArgs. I hope you get the point.

However, I was thinking about an alternative solution: In a nutshell: to go the same way that AutoValue did by providing Extensions for the Annotation Processor. Then one could write a FragmenArgs Annotation Processor Extension for Parceler which would generate code during annotation processing.

But I'm not too sure if it is worth the effort right now.

@bryant1410
Copy link
Contributor Author

I think it's a good idea what you pose, and yes with a doubtful tradeoff, at least by now.

@nkleban
Copy link

nkleban commented Jan 21, 2017

The way that AutoValue did is really good. An idea that you have to insert this line "@arg(bundler = ParcelerArgsBundler.class)" with every parcelable field unfortunately stopping us from using it in every our projects.

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

No branches or pull requests

3 participants