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

Merge change from google internal #115

Commits on Feb 4, 2015

  1. Fix bug in ClassName.fromClass which causes an infinite loop if you p…

    …ass it a nested class.
    
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=84557991
    sethnel99 authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    3500539 View commit details
    Browse the repository at this point in the history
  2. Comment out javawriter pending migration to javapoet (it's left there…

    … essentially as a todo), and depend on the released auto-value.
    
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=84571281
    cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    2a0f0c6 View commit details
    Browse the repository at this point in the history
  3. Fix dependency request formatting so that it prints out resolved meth…

    …ods &
    
    parameters.  With support for implicit generic types, this otherwise printed
    out the unresolved methods/parameters, and was confusing.
    
    In fixing this, I also cleaned up the general listing of the dependency chain
    so that variables aren't suffixed with '()', and so that raw types are skipped
    (since they're synthetic dependencies due to the way members injectors are
    implemented, not real things that folks care about).
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=84577408
    sameb authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    475a606 View commit details
    Browse the repository at this point in the history
  4. Add support for subclassing modules to specify generic types. In the …

    …process, clean up general support for subclassing modules & add a lot of validation. The rules are:
    
    a) Modules may be subclasses and may be subclassed.
    b) @module(includes) from parent classes are unioned into the child's dependencies.
    c) @provides methods may not be overridden or override another method.
    d) Modules referenced by @module(includes) must not be abstract.
    e) Modules referenced by @module(includes) must have the same @module annotation.
    f) @component(modules) must not be abstract.
    g) If a Module has type parameters, it must be abstract.
    
    (None of this validation existed before, though some of it should have.)
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=84582926
    sameb authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    0d49be8 View commit details
    Browse the repository at this point in the history
  5. Add lookup of ProductionBindings to BindingGraph.

    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=84670820
    jbeder authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    ca9c82b View commit details
    Browse the repository at this point in the history
  6. Fix NPE when map bindings are used without producers, and added corre…

    …sponding functional test.
    
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=84696369
    jbeder authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    69667a2 View commit details
    Browse the repository at this point in the history
  7. Add a method to MoreTypes that does the same operation as Types.asEle…

    …ment, but can be called statically. Then, clean up all of the places that callers to MoreTypes.asTypeElement were passing through a Types instance just for that reason.
    
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=84753119
    gk5885 authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    cc08719 View commit details
    Browse the repository at this point in the history
  8. Make @Component a runtime-retained annotation, which can allow more…

    … interoperability with Guice.
    
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=84836495
    dweis authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    e33a27c View commit details
    Browse the repository at this point in the history
  9. Remove the Guava dependency from the Dagger functional tests. The tes…

    …t now ensures that Dagger does not generate any code that uses Guava.
    
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=84889646
    jbeder authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    e78eb21 View commit details
    Browse the repository at this point in the history
  10. Add producers functional tests.

    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=84889738
    jbeder authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    36acd6a View commit details
    Browse the repository at this point in the history
  11. Produce sane error messages if for members injection requests of raw …

    …types or
    
    unbounded types.
    
    In a better world, I would analyze the required dependencies of the members
    injected type (and its superclass' dependencies) and allow raw or unbounded
    parameters if none of the parameters were used as actual dependencies.
    Unfortunately, that's really hard to get right.  So might as well fail with a
    sane error message for now until someone gets around to doing it better.
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=85010484
    sameb authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    a5bf53f View commit details
    Browse the repository at this point in the history
  12. Allow dagger @component interfaces to depend upon interfaces which ar…

    …e not themselves @component interfaces.
    
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=85067567
    sethnel99 authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    56f8f00 View commit details
    Browse the repository at this point in the history
  13. An initial implementation of @subcomponent. It elides validation, so …

    …it's a "use at your own risk" feature, but that is forthcoming.
    
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=85091489
    gk5885 authored and cgruber committed Feb 4, 2015
    1 Configuration menu
    Copy the full SHA
    959f5cd View commit details
    Browse the repository at this point in the history
  14. Add static analysis @nullable checks. Injected parameters that aren't…

    … marked @nullable cannot by injected by an @provides or component method that has @nullable.
    
    Also generate null-checks in provision factories & component factories if they aren't @nullable.
    
    This can be controlled by a "dagger.nullableValidation={ERROR,WARNING}" flag, with the default being ERROR.  WARNING will cause compilation to produce warnings when there's a nullable mismatch, and will ignore null return values from providers/component methods. ERROR will trigger the new behavior.
    
    This also changes compile-testing to support passing options to the compiler.
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=85151739
    sameb authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    725e783 View commit details
    Browse the repository at this point in the history
  15. Implement basic component generation for producers.

    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=85157486
    jbeder authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    905358f View commit details
    Browse the repository at this point in the history
  16. Enable subcomponents of subcomponents (in addition to components).

    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=85180709
    gk5885 authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    cd57feb View commit details
    Browse the repository at this point in the history
  17. Change the default dagger.nullableValidation to ERROR.

    Explicitly mark [] to use WARNING, since they're full of errors.
    Global TAP looks pretty happy: []
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=85283950
    sameb authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    e2e97ad View commit details
    Browse the repository at this point in the history
  18. Fix handling of dependencies attribute of ProductionComponent.

    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=85435991
    anuraag authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    abb9ea8 View commit details
    Browse the repository at this point in the history
  19. Fix @ProductionComponent depending on @ProductionComponent. The inter…

    …face for Producer<T> has a ListenableFuture<T> get() method but the codegen was creating a T get() method.
    
    -------------
    Created by MOE: http://code.google.com/p/moe-java
    MOE_MIGRATED_REVID=85519772
    anuraag authored and cgruber committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    307126b View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2015

  1. Configuration menu
    Copy the full SHA
    627a521 View commit details
    Browse the repository at this point in the history
  2. Cause the functional tests to use Java7 syntax, since they do. We nee…

    …d to figure out if we want to revert that and force the functional tests back to 1.6, or just leave it, since the functionality isn't any different.
    cgruber committed Feb 5, 2015
    Configuration menu
    Copy the full SHA
    847e2ae View commit details
    Browse the repository at this point in the history