just
just copied to clipboard
Allow (some) attributes on aliases
Aliases can fail if the associated recipe is conditional
- Allow [unix] / [windows] attributes on aliases:
[unix] alias ra := runall
[unix] @runall: ./scripts/runall.sh
- Or display a friendly error message that the recipe is only available in Unix / Windows?
This seems pretty reasonable to me.
And actually, I think this already works with the alias attribute, in progress in #2615.
I think actually we could consider just disabling an alias with no warning if the corresponding recipe isn't available because of a conditional attribute.
Although we might eventually want to allow something like:
[unix]
alias build := build-unix
[windows]
alias build := build-windows
So we should make sure there aren't any implications for that.