-
Notifications
You must be signed in to change notification settings - Fork 2
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
Preserve order of execution #128
Comments
@thelinuxlich can you provide your config and how do you imagine this working in terms of configuration API? |
Sure, I have something like this in my
I'd expect nothing changes config-wise, just that run-if-changed respects the order defined here. (I need packages installed and migrations applied before running codegen) |
It might work if we reverse the order in which Would try to give it a go in the following days. In the meantime, you can repeat some commands so that it also installs packages and runs migration before running codegen. |
Hm, actually run-if-changed/src/resolveMatchingPatterns.js Lines 3 to 11 in d0b41c3
Might need to play with that further, but I'm afraid it will be hard to make it work reliably without changing the config structure. |
@thelinuxlich OK, I tried this something very close to your config. It does work like you would expect. It goes through the configured patterns in order. The alphabetic order doesn't matter, but the order you used in your configuration file. If files found in multiple patterns are changed, then it will first run the commands attached to the earlier patterns in the config. If you are not seeing that, could you show a reproducible demo? Please check that multiple patterns are affected at the same time. It might be that only later commands are run when the lock file hasn't changed. If you want the installation or migration commands to run before codegen even when the respective files are unchanged, you would need to repeat these commands before the codegen command. |
I have a task triggering
pnpm install
wheneverpnpm-lock.yaml
changes and it should run before other tasks that might be dependent on it.The text was updated successfully, but these errors were encountered: