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 from moe writing branch from 9f986abd0f985e717dde1476aeaf058df50064ff #229

Merged

Conversation

cgruber
Copy link

@cgruber cgruber commented Aug 29, 2015

A variety of changes imported from google's internal repository, including:

  • Generated sources are now formatted in google style using google-java-format
  • Some initial work for full compatibility with the JSR-330 spec and TCK
    • Cyclic dependencies are now supported if they are broken by an indirection of injecting a Lazy<T> or Provider<T> (helping bring Dagger into compliance with JSR-330, and addressing Support dependency cycles containing Lazy or Provider #200)
    • Initially posted the JSR-330 TCK sources to show how dagger is complying, but reverted, as we will be relying on the published binary artifact of the TCK.
    • Other compliance work is still in google's internal repository, but is delayed pending a push of compile-testing
    • Some build-time optimizations, reducing the time to produce very large graphs, or graphs with large numbers of modules
    • Some correctness fixes to set bindings in subcomponents.
    • Some improved error reporting on missing bindings in the context of subcomponents
    • Some fixes to javadocs, particularly around Lazy<T>
    • Type inference fixes that should make Dagger less brittle building in Javac 8/9+ and more generally deal with type inference incompatibilities between versions of javac.
    • Miscellaneous build changes to accommodate the above
    • Miscellaneous re-factorings in support of the above or forthcoming features, and to move some code into auto-common
    • And more!

@googlebot
Copy link
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@cgruber cgruber force-pushed the moe_writing_branch_from_9f986abd0f985e717dde1476aeaf058df50064ff branch from 707a8df to e65ed9d Compare August 29, 2015 22:13
@cgruber
Copy link
Author

cgruber commented Aug 29, 2015

clabot lies. these are googler originated changes.

@cgruber cgruber added cla: yes and removed cla: no labels Aug 29, 2015
@cgruber
Copy link
Author

cgruber commented Aug 29, 2015

Ok, this is hella-weird. It's succeeding on oracle JDK but on OpenJDK one test is failing, when tested from the pull request branch, but both pass when tested from the branch push. I don't know if this test is flaky, or what, but it's kind of a problem, since if it fails on the merge, we won't get a snapshot.

@netdpb and @gk5885 - can you folks look at this build output and think through whether this is just a flaky test, or some environemental issue.

https://travis-ci.org/google/dagger/builds/77860604

@netdpb
Copy link
Member

netdpb commented Sep 10, 2015

It's weird. The two MembersInjector fields are unused in the subcomponent,
and they appear out of order.

  1. Why are they even there, if they're unused?
  2. Why are they out of order? Are we using HashSet or HashMap instead of
    a data structure with predictable iteration order?

On Sat, Aug 29, 2015 at 6:23 PM Christian Edward Gruber <
[email protected]> wrote:

Ok, this is hella-weird. It's succeeding on oracle JDK but on OpenJDK one
test is failing, when tested from the pull request branch, but both pass
when tested from the branch push. I don't know if this test is flaky, or
what, but it's kind of a problem, since if it fails on the merge, we won't
get a snapshot.

@netdpb https://github.com/netdpb and @gk5885
https://github.com/gk5885 - can you folks look at this build output and
think through whether this is just a flaky test, or some environemental
issue.

https://travis-ci.org/google/dagger/builds/77860604


Reply to this email directly or view it on GitHub
#229 (comment).

--dpb

@cgruber cgruber force-pushed the moe_writing_branch_from_9f986abd0f985e717dde1476aeaf058df50064ff branch from e65ed9d to 3960cb0 Compare October 1, 2015 05:46
@googlebot
Copy link
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@cgruber cgruber force-pushed the moe_writing_branch_from_9f986abd0f985e717dde1476aeaf058df50064ff branch from 3960cb0 to b50f06c Compare October 21, 2015 00:31
cgruber and others added 10 commits October 20, 2015 17:32
*** Reason for rollback ***

Breaks android build

*** Original change description ***

Replace use of deprecated Futures.fallback with Futures.catching.

***
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=90537687
…ecutes the maven build, and update the pom files with the relevant updates (not yet merged in from github).

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=95043495
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98345805
*** Reason for rollback ***

Broke some android targets that are somehow putting the old version of Guava on the classpath for the processor.

*** Original change description ***

Refactor module information into ModuleDescriptor.  This provides a single, consistent way to access information about modules.

Note: This CL changes the order in which modules are referenced in components, but that shouldn't ever matter.

***
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98353908
Flame graphs were taken from a build graph with 50 modules and 200 bindings per module. In each module, the provider methods have an order where each requires the object provided by the prior method.

The number of samples is roughly halved, which suggests a ~50% reduction in build time for this binding graph.

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98407197
…le Java Formatter.

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98411635
…nce to FluentIterable.append.

*** Original change description ***

Automated g4 rollback of changelist 98344654.

*** Reason for rollback ***

Broke some android targets that are somehow putting the old version of Guava on the classpath for the processor.

*** Original change description ***

Refactor module information into ModuleDescriptor.  This provides a single, consistent way to access information about modules.

Note: This CL changes the order in which modules are referenced in components, but that shouldn't ever matter.

***

***
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98420884
*** Reason for rollback ***

Broke an internal set of tests

*** Original change description ***

Ensure that all sources emitted by Dagger are formatted with the Google Java Formatter.

***
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98422425
@cgruber cgruber force-pushed the moe_writing_branch_from_9f986abd0f985e717dde1476aeaf058df50064ff branch from b50f06c to 2d42077 Compare October 21, 2015 00:55
gk5885 and others added 6 commits October 20, 2015 18:06
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98439423
Two Produced objects compare equal if both are successful, with equal values, or both are failed, with equal exceptions.

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98445597
…sses ComponentWriter and SubcomponentWriter so that we can use fields instead of passing arguments to methods.

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98740715
…emberSelectSnippet(BindingKey). This lets SubcomponentWriter implement a recursive search up the component tree without combining map data structures.

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98744070
…ava have been addressed.

*** Original change description ***

Automated g4 rollback of changelist 98411635.

*** Reason for rollback ***

Broke internal tests

*** Original change description ***

Ensure that all sources emitted by Dagger are formatted with the Google Java Formatter.

***

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98745221
…w method, getMultibindingContributionSnippet(ContributionBinding). This lets SubcomponentWriter implement a recursive search up the component tree without combining map data structures.

Use MemberSelect for those snippets in order to determine whether the snippet is owned by the subcomponent or a parent.

-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=98753147
jbeder and others added 12 commits November 11, 2015 16:33
This adds a fake binding for the ProductionComponentMonitor so that producer factories can request them like normal provision bindings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=106149671
… skipped because its input failed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=106328773
This fixes TAP for domain_registry_large.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=106402329
…efficient, it allows us to simplify the way we store and reference fields in the future.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=106533383
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=106597867
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=106950444
…re resolved in the subgraph, not those that are inherited.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=106970691
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=107049195
…tic bindings, and allow subcomponent factory methods to elide them too.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=107097167
---------------------
Automatic change by MOE
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=107358545
…nce shade can't merge them.

Tested:
  Actually ran the build shading with additional sealed bits in the classpath
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=107439464
… of the functional tests will run, add auto-factory to support its use in the functional test, and bump guava to the top of the classpath to avoid truth/auto-factory/etc. from supplying guava-18.0.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=107439700
@cgruber cgruber force-pushed the moe_writing_branch_from_9f986abd0f985e717dde1476aeaf058df50064ff branch from 4ce8303 to a012aa2 Compare November 12, 2015 01:13
@googlebot
Copy link
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@cgruber cgruber force-pushed the moe_writing_branch_from_9f986abd0f985e717dde1476aeaf058df50064ff branch from d3de6fb to a012aa2 Compare November 12, 2015 20:51
ronshapiro and others added 4 commits November 12, 2015 18:52
This doesn't mean that we should have naming sequences in those patterns, but our types that derive names from inputted types should not jump through hoops to have a style-compliant name.

Addresses Github issue #173
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=107509623
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=107703506
Tested: pushed a trial branch with this change to travis (https://travis-ci.org/google/dagger/jobs/90810414)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=107711893
@cgruber
Copy link
Author

cgruber commented Nov 13, 2015

Huzzah! Builds clean!

@gk5885
Copy link

gk5885 commented Nov 13, 2015

Lgtm

@cgruber
Copy link
Author

cgruber commented Nov 13, 2015

After a long journey, this branch cometh home. (For the record, I got an LGTM from @gk5885 outside of this issue).

@cgruber
Copy link
Author

cgruber commented Nov 13, 2015

Oh, and hten also in this issue, but github lags. :)

cgruber added a commit that referenced this pull request Nov 13, 2015
…f985e717dde1476aeaf058df50064ff

Merge from moe writing branch from 9f986ab
@cgruber cgruber merged commit 9293bcf into master Nov 13, 2015
@cgruber cgruber deleted the moe_writing_branch_from_9f986abd0f985e717dde1476aeaf058df50064ff branch November 13, 2015 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.