-
Notifications
You must be signed in to change notification settings - Fork 32
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
Allow integration with melos #396
Comments
I support better integration in principle. Figuring out the details is always fun, though. CC @natebosch and @jakemac53 |
Personally I would suggest just creating your own script under If we did want to support something like this I would probably just support running arbitrary commands, we don't want to be picking up a dependency on the api of melos. |
+1 would #382 be sufficient to solve this use case? |
@natebosch Yes, #382 would be sufficient. |
I'm not very familiar with It's possible to get it working with Melos, but it's not great: # a/mono_pkg.yaml
sdk:
- stable
stages:
- analyze:
- command:
- 'dart pub global activate melos'
- 'dart pub global run melos bootstrap --scope a'
- 'dart analyze'
- format:
- command:
- 'dart pub global activate melos'
- 'dart pub global run melos bootstrap --scope a'
- 'dart format --output=none --set-exit-if-changed .'
- test:
- command:
- 'dart pub global activate melos'
- 'dart pub global run melos bootstrap --scope a'
- 'dart test' I don't think #382 would help all that much, since you would have to configure Melos for every job, if I understand the intent of the PR correctly. It would be optimal, if there was a way to replace the If this was configurable in |
Yeah, having some template silly (like #382 ) would be nice. Not sure how much complexity we'd be adding... |
Would it make sense to expose |
melos
is another tool for managing mono repos. However, I feel thatmono_repo
is better when generating readable/debuggable CI config in the least amount of typing. Therefore, we decided to use bothmelos
andmono_repo
for our repo.This, unfortunately, poses a problem:
melos
needs to bedart pub global activate
-d and ranmelos bootstrap
to link local packages using thepubspec_overrides.yaml
file. If not, then analyzing and testing might fail.mono_repo
provides no way of running arbitrary commands at the start of each CI job.I hope we can either allow defining commands to be run at the start of each job, or add a
melos
config tomono_repo.yaml
. When set totrue
, it will add a step to activate and bootstrapmelos
before any user-defined commands are run.I have already implemented the second option in a basic way. If accepted I'd be glad to further polish it!
The text was updated successfully, but these errors were encountered: