collaction_app icon indicating copy to clipboard operation
collaction_app copied to clipboard

[SUGGESTION]: Integrate melos to simplify task execution

Open wizlif opened this issue 3 years ago • 5 comments

We currently need to manually run commands to execute tasks like build_runner, format testing, analyzing etc. These are common tasks that can be run multiple times during development. We can integrate melos which will act as a Makefile for our flutter project, creating shortcuts for all tasks like building buiild_runner.

Some tasks that could be simplified include :-

  • [ ] Generating files with build_runner.
  • [ ] Checking code analysis with flutter analyze.
  • [ ] Checking code format status.
  • [ ] Running all tests

wizlif avatar Nov 14 '22 04:11 wizlif

I think hooks are better in this case. Everyone has git, instead of relying on melos. Everyone would need to install their cli.

Melos is good if you are eg. Developing a federated package/plugin. Not sure it beats git hooks in our usecase though.

Xazin avatar Nov 14 '22 06:11 Xazin

How would we use hooks to execute build_runner ?

I was looking at simplifying some of the commonly used tasks during development so instead of typing flutter pub run build_runner watch -d we could simply have melos build:watch alternatively if we don't want to use melos, we can still create a Makefile with some of these commands.

wizlif avatar Nov 14 '22 13:11 wizlif

But most of the time people forget to setup Git Hooks @Xazin so it wont run by default right?

pythonhubdev avatar Mar 09 '23 16:03 pythonhubdev

But most of the time people forget to setup Git Hooks @Xazin so it wont run by default right?

That is not really an issue though. Melos is built for mono repos, this isn't one.

It's overkill to use it as such. You would also need to run one command to have melos working, just as you would hooks. So that cannot be the argument.

Xazin avatar Mar 10 '23 04:03 Xazin

Okay @Xazin

pythonhubdev avatar Mar 10 '23 05:03 pythonhubdev