Giter VIP home page Giter VIP logo

Comments (2)

RBusarow avatar RBusarow commented on June 20, 2024

Thanks for the (extremely quick) report!

For reference, the generator that creates the @MergeSubcomponent interfaces is called ContributesSubcomponentHandlerGenerator.

The problem is one of sequencing. The ContributesSubcomponentHandlerGenerator is invoked after your custom generators have already finished. That change is new.

Prior to beta05, the ContributesSubcomponentHandlerGenerator was invoked in a batch with most of the other generators - including any custom ones. It was invoked last, but that entire batch of generators is invoked in a loop, so anything it generates is seen by the other generators in the subsequent loop. The problem with this approach was that the custom generators can also be generating @ContributesSubcomponent interfaces, where those new interfaces replace existing ones.

In your use-case, you're depending upon what is effectively an internal API. Are you able to get the information you need (the scope?) from something else upstream?

from anvil.

SteinerOk avatar SteinerOk commented on June 20, 2024

@RBusarow Good evening, sorry for the wait.

Thanks for the clarification, I understand why this is happening now.

But, unfortunately, I don’t know what to do now, because this change breaks many of my code generators: in my main project the structure of subcomponents is described in the DI module (as light as possible with a minimum of dependencies), and the root component (skeleton component) in the application module, in which integrations for everything are already generated.
This happens thanks to the annotation @ContributesSubcomponent for subcomponents and the use of generated components with annotation @MergeSubcomponent in custom generators

And so it turns out that the benefits of the annotation@ContributesSubcomponent are lost after these changes.

Maybe you can suggest something if this is not a bug but a feature?

from anvil.

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.