Giter Club home page Giter Club logo

Comments (8)

svenjacobs avatar svenjacobs commented on June 17, 2024 1

I have a similar problem when trying to create a factory that contains another generated factory as a provided dependency.

@AutoFactory
public class SomeClass {

  SomeClass(@Provided AnotherClassFactory anotherClassFactory,
            @Provided SomeDependency someDependency,
            int someValue) {
    ...
  }
}

Given that AnotherClass is placed in a different package, the generated SomeClassFactory does not import com.example.another.AnotherClassFactory and compilation fails. If I use the fully qualified type of AnotherClassFactory in the constructor of SomeClass compilation works.

Tested with 1.0-beta2.

from auto.

gg7 avatar gg7 commented on June 17, 2024 1

To anyone googling for "error: cannot find symbol", "Note: Generating a Provider for", "Prefer to run the dagger processor over that class instead": using fully qualified types solved the issue for me.

from auto.

Zubnix avatar Zubnix commented on June 17, 2024

I have the same problem but I can not pinpoint the cause.

from auto.

cgruber avatar cgruber commented on June 17, 2024

We are likely mismanaging imports. We will be upgrading to the new
javawriter when we peel it out of dagger 2, and fix several of these issues
at a stroke.
On Sep 9, 2014 2:14 AM, "Zubnix" [email protected] wrote:

I have the same problem but I can not pinpoint the cause.


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

from auto.

ben-manes avatar ben-manes commented on June 17, 2024

Just ran into this too. Usually works great, but refactoring of the package structure triggered this bug. The workaround is okay, but annoyingly verbose.

from auto.

dbarwacz avatar dbarwacz commented on June 17, 2024

So, in short, for some reason, factory fails at using dependencies that are yet to be generated by autofactory itself. Looks like code gen does not include import for those dependencies. I might find some time to look at this. Is it currently being worked on and are contributions welcome?

from auto.

francisco-bernardi avatar francisco-bernardi commented on June 17, 2024

Any news on this issue? I just run into it and it will be great to get it fixed.

from auto.

ronshapiro avatar ronshapiro commented on June 17, 2024

Let's merge this into #297, I think it's two sides of the same coin

from auto.

Related Issues (20)

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.