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

auto_route_generator conflicts with objectbox_generator #1086

Closed
alextarana opened this issue May 26, 2022 · 5 comments
Closed

auto_route_generator conflicts with objectbox_generator #1086

alextarana opened this issue May 26, 2022 · 5 comments

Comments

@alextarana
Copy link

alextarana commented May 26, 2022

I have faced an issue about a conflict with objectbox_generator caused by auto_route_generator as described in objectbox/objectbox-dart#424.

I tried some workaround such as writing a build.yaml file as below:

targets:
  $default:
    builders:
      objectbox_generator|generator:
        options:
          required_inputs: [".freezed.dart"]
      auto_route_generator|autoRouteGenerator:
        options:
          runs_before:
            - objectbox_generator:generator

My solution doesn't work as expected.

Any suggestions?

@Milad-Akarie
Copy link
Owner

@alextarana What's the conflict?

@alextarana
Copy link
Author

@Milad-Akarie objectbox_generator doesn't start to generate code if auto_route_generator is enabled.

@jakoss
Copy link

jakoss commented Jun 1, 2022

Facing exact same issue but only when i try to use object box with freezed. Using only objectbox @entity everything works fine

@redarflap
Copy link

I also got the same issue but found no workaround.

I tried limiting the scanned directories for both generators in build.yaml, so that they wouldn't scan the same files.
Not even disabling the auto_route_generator in the build.yaml worked.

At the moment auto_route_generator is added to pubspec.yaml, objectbox just stops generating freezed classes.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants