google / mono_repo.dart

Allows easy management of repositories with multiple Dart packages
https://pub.dev/packages/mono_repo
BSD 3-Clause "New" or "Revised" License
161 stars 32 forks source link

Flutter Support in Github Actions #375

Closed mark-dropbear closed 2 years ago

mark-dropbear commented 2 years ago

I have a quick question that I wasn't sure if I was doing something wrong or this was a known issue.

I have a mixed repository (https://github.com/dropbear-software/fullstack-dart-demo) that contains:

  1. A Dart Package
  2. A Dart CLI application
  3. A Flutter Web application

I'm using mono_repo to mange all of this and when I run mono_repo presubmit everything works find but on Github Actions it fails because it is downloading the Dart SDK rather than the Flutter SDK and when it comes to run dart pub upgrade it will fail as can be seen here https://github.com/dropbear-software/fullstack-dart-demo/runs/5871740230?check_suite_focus=true

I just wanted to get a quick understanding if this was something that could be easily fixed on my end or it isn't a supported use case at the moment.

jakemac53 commented 2 years ago

We do have an example flutter project in this repo and it seems to work without anything special as far as I can tell. Have you tried upgrading mono_repo to the latest version (just re-activate it dart pub global activate mono_repo)?

jakemac53 commented 2 years ago

I think there is a bug where it is grouping analyze steps that it thinks are identical into a single job - but it needs to separate them based on the SDK they use.

jakemac53 commented 2 years ago

cc @kevmoo

mark-dropbear commented 2 years ago

Thanks for the reply @jakemac53 I made the upgrade from 6.1.0 to 6.2.0 and reran mono_repo check && mono_repo generate both of which again worked locally but fail for the same reason as previously in GitHub Actions https://github.com/dropbear-software/fullstack-dart-demo/runs/5889388138?check_suite_focus=true

Let me also dive into how you have things set up in this repo for the flutter application because if thats the case I would have to assume that it is possible for me also.

Maybe @kevmoo has some ideas in the meantime as well, lets see :)

jakemac53 commented 2 years ago

I have confirmed the issue is that analyze actions will get merged based on the Name of the action (analyze) and the command (which is just dart analyze). So it doesn't distinguish between dart/flutter and the flutter command ends up getting grouped in with dart analyze actions (but won't get the proper flutter setup).

So it is a bug. You can likely remove any merge_stages config that you have set up in your mono_repo.yaml to resolve this issue for now.

jakemac53 commented 2 years ago

One solution is to use flutter analyze instead of dart analyze. Although we might want a more general solution to this problem.

mark-dropbear commented 2 years ago

Appreciate the help in the meantime!

jakemac53 commented 2 years ago

This is published now as version 6.2.1, please re-open if it doesn't resolve things