forked from square/dagger
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
Merged
cgruber
merged 21 commits into
master
from
moe_writing_branch_from_02a32292dab18eafe393676bf6d3a32725219078
Feb 5, 2015
Merged
Merge change from google internal #115
cgruber
merged 21 commits into
master
from
moe_writing_branch_from_02a32292dab18eafe393676bf6d3a32725219078
Feb 5, 2015
Conversation
This file contains 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
…ass it a nested class. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=84557991
… 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
…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
…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
------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=84670820
…sponding functional test. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=84696369
…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
… interoperability with Guice. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=84836495
…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
------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=84889738
…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
…e not themselves @component interfaces. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=85067567
…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
… 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
------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=85157486
------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=85180709
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
------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=85435991
…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
This pull is pending a pull from google/compile-testing. Should be out shortly. |
"Restrictions for non-@nullable providers, such that they properly throw NPEs" undersells that compile-time checking for nullness a little bit. :-) |
…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
force-pushed
the
moe_writing_branch_from_02a32292dab18eafe393676bf6d3a32725219078
branch
from
February 5, 2015 00:56
939c09f
to
847e2ae
Compare
LOL. Fair, sam. I'll edit a bit. |
@gk5885 - PTAL. |
Closed
cgruber
added a commit
that referenced
this pull request
Feb 5, 2015
…ab18eafe393676bf6d3a32725219078 Merge change from google internal
cgruber
deleted the
moe_writing_branch_from_02a32292dab18eafe393676bf6d3a32725219078
branch
February 5, 2015 22:16
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Various changes, including:
@SubComponent
@Nullable
providers@Nullable
checked at compile time such that@Nullable
providers can only be used by@Nullable
injection sites.