Git Product home page Git Product logo

postman's People

Contributors

jtschult avatar kennethnickles avatar mannodermaus avatar ndtaylor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

postman's Issues

Split into processor & core

This library includes a dependency on javawriter for its compile-time code generation. Since there is only one artifact to include for both the processor and core, this dependency is shipped in the final package as well. Please consider splitting up the library into two separate modules, to have inclusion work akin to other code generation libraries, like so:

compile "com.github.Workday:postman:<version>"
apt "com.github.Workday:postman-processor:<version>"

Only the processor module would then require the dependency on javawriter.

Remove dependency on Apache's Commons-Lang

This library includes all of commons-lang because of one single usage in capitalizing String input. Since the library footprint of commons-lang, with its roundabout 3000 methods, is comparatively big in relation to its usefulness in Postman, I am proposing to get rid of the dependency and roll our own implementation of StringUtils.capitalize().

Parceling Parent Class Fields

I have two classes:

@Parceled
public class A implements Parcelable {

    public static final Creator<A> CREATOR = Postman.getCreator(A.class);

    State mState;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        Postman.writeToParcel(this, dest);
    }

    @Parceled
    public static class State implements Parcelable {

        public static final Creator<State> CREATOR = Postman.getCreator(State.class);

        // Postman Fields

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            Postman.writeToParcel(this, dest);
        }
    }
}

and

@Parceled
public class B extends A implements Parcelable {

    public static final Creator<B> CREATOR = Postman.getCreator(B.class);

    State mState

@Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        Postman.writeToParcel(this, dest);
    }

    @Parceled
    public static class State extends A.State implements Parcelable {

        public static final Creator<State> CREATOR = Postman.getCreator(State.class);

        // Postman Fields

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            Postman.writeToParcel(this, dest);
        }
    }
}

As far as I can tell the State$$Parceler only handles its own fields, but the B$$Parceler seems to be setting the State field twice. Once I assume is for the A.State field and the other for the B.State field.

public final class B$State$$Parceler implements Parceler<B.State> {

  @Override
  public void writeToParcel(B.State object, Parcel dest) {
    Bundle bundle = new Bundle();
    bundle.putInt("mSomeCustomField", object.mSomeCustomField);
    dest.writeBundle(bundle);
  }

  @Override
  public B.State readFromParcel(Parcel parcel) {
    B.State object = new B.State();
    Bundle bundle = parcel.readBundle();
    bundle.setClassLoader(B.State.class.getClassLoader());
    object.mCurrentManaCost = bundle.getInt("mCurrentManaCost");
    return object;
  }

  @Override
  public B.State[] newArray(int size) {
    return new B.State[size];
  }

}

public final class B$$Parceler implements Parceler<B> {

  @Override
  public void writeToParcel(B object, Parcel dest) {
    Bundle bundle = new Bundle();
    bundle.putParcelable("mState", object.mState);
    bundle.putParcelable("mState", object.mState);
    dest.writeBundle(bundle);
  }

  @Override
  public Commander readFromParcel(Parcel parcel) {
    B object = new B();
    Bundle bundle = parcel.readBundle();
    bundle.setClassLoader(B.class.getClassLoader());
    object.mState = bundle.getParcelable("mState");
    object.mState = bundle.getParcelable("mState");
    return object;
  }

  @Override
  public B[] newArray(int size) {
    return new B[size];
  }

}

Can you explain how these parcelers handle class hierarchy and if this is a problem?

Postman version 1.3 Parcelers disappear

I upgraded to version 1.3 and the parcelers disappear. When I downgrade to 1.2 they reappear. Makes me believe the processor isn't running in 1.3, or something changed that is causing the processor to not run on my particular build.

Package not included in Android?

../../../../../../.gradle/caches/modules-2/files-2.1/com.workday/postman/1.1/ee8f2b1ed06368a16d962ee20e5ab4ae6c8dc3ec/postman-1.1.jar: Invalid package reference in library; not included in Android: javax.tools. Referenced from com.workday.postman.codegen.ParcelerGenerator.

Priority: 6 / 10
Category: Correctness
Severity: Error
Explanation: Package not included in Android.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.