Open nateshmbhat opened 4 years ago
Yes, I ran into this issue, because I separate my backend and frontend code into separate packages, but use common models that are defined in the backend. The generator freezes when I try to annotate the models with framyModel in the backend package (probably because there is no FramyApp() in the backend).
That's not good :/ What do you mean it freezes? The build never ends or does it end with an error?
Hmm, can't seem to reproduce the freezing, I'll file a separate issue if I see that again. When I saw it the build_runner build command just never ended, and kept reanalyzing files and spitting out warnings.
I guess what I want now is really #133, because the framy generator in the frontend doesn't find my model classes in my backend package.
It's possible to look at the imports of the current file and look for the model class in those files without requiring the user to manually put framy model annotation.
If you have seen "auto_route" library, it uses something like this to auto include all the parameters for the Widget.
This will greatly help with seeing framy model annotations everywhere.