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

Suggestion to Change Annotation Name, Package #4

Closed
JakeWharton opened this issue Jun 4, 2014 · 5 comments
Closed

Suggestion to Change Annotation Name, Package #4

JakeWharton opened this issue Jun 4, 2014 · 5 comments

Comments

@JakeWharton
Copy link

The name "Android AutoValue" implies that AutoValue somehow doesn't work on Android which is of course not true. Additionally, when using both this and the original, it's needlessly ambiguous which is in use where. Additionally, using the package of android.* is a bit of an anti-pattern since it conveys you are authoring code on behalf of the platform (and therefore Google).

I would recommend you change the annotation to @AutoParcel to better convey the behavior and change the package to auto.parcel to line-up with the other Auto offerings.

Creating a parcel-variant of AutoValue was one of the first things I did when it came out. My version, however, tears out the weird custom string template and removes the Eclipse compiler workaround. It uses @AutoParcel as the annotation and the auto.parcel package. I have a library I want to release which relies on callers creating a few parcelable things. I want to offer a library like this one to make it easy but I am fundamentally against the two things outlined in the first paragraph. I would prefer if you made changes to accommodate these, but it's your library to do with what you want and are of course welcome to say no.

@frankiesardo
Copy link
Owner

I also first tried to slim down the library to provide essential things only, but I kept it close to the original for either:

  • Merge parcelable support into the main branch. Something that hasn't happened yet and may never happen.
  • Merge any relevant changes that google pushes back into this fork.

I'd rather have google to maintain the entire codebase than keeping this fork alive. And if that proposal is accepted it would solve the issues you mentioned as well.
In the meantime I agree with you and I'm going to follow your advice on naming conventions. A new version should be available soon.

@JakeWharton
Copy link
Author

I'm glad to hear it (and look forward to it). I'm always happy to rm -rf code I wrote and use something someone else wrote. If you're busy and would like help with the refactor I'd be happy to send some PRs as well.

We (Square) have a pretty good working relationship with the core java team at Google so I can help advocate its inclusion upstream.

@frankiesardo frankiesardo mentioned this issue Jun 4, 2014
@frankiesardo
Copy link
Owner

Actually the renaming wasn't that long and it is already completed. :shipit: A version with the new id should be up soon. If you think there are other things left to tweak we can have a look at it.

But yeah, the ideal solution would be to merge everything back upstream so I can rm -rf this code too. Pinging the Google team it's surely a nice idea 👍

@JakeWharton
Copy link
Author

Awesome! Just saw it on central so I'll go ahead and start playing. Thanks for the speedy response.

@JakeWharton
Copy link
Author

Going to close since all my concerns are fulfilled. Pushing to Google is a separate battle. Thanks again!

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

2 participants