-
-
Notifications
You must be signed in to change notification settings - Fork 763
Description
Description
Howdy Task!
I know namespaces exist, and I use them heavily, but it's not enough for my use case.
I use Task heavily in a monorepo. It now contains tasks for:
- developer interactions/bootstrapping
- pre-commit hook targets/entries
- github ci action steps
- dockerfile container creation
This has been really great for having re-usable, composable steps that are also user-discoverable.
However even with things namespaced, the user experience for 1 is not great when all the other tasks exist. If I lean into usin Task further, I can imagine 100+ tasks, and that's just useless when listing as a developer.
So for me, being able to set "categories" of visibility (on top of namespaces), being able to default that only a specific namespace gets displayed, or something, would be great.
What i'm proposing is something like:
default_visibility: development
tasks:
up:
desc: Starts up the docker compose environment for development
visiblity_group: development
cmds:
- docker compose -f docker/docker-compose.yaml up -d
down:
desc: Stops the docker compose environment for development
visiblity_group: development
cmds:
- docker compose -f docker/docker-compose.yaml down
mocks:
desc: Generate mocks for the firehose service
visbility_group: ci
cmds:
- moq -out ./config_manager_mock.go ./ ConfigManager
Then, when listing, allow me to do something like task --group development or something.
For me, the real ask here is somehow hiding groups of tasks by default. I want Task to be the root/first place to look for all Tasks, regardless if it's a CI task or commonly used dev task. All tasks should be easily runnable by a user, without having to know which group/taskfile/etc it exists in. However for those that are just learning/discovering the code base, a simple task --list or analogous should present the user with the least amount of options possible, ideally with tasks that are more tailored to their experience.
Using namespaces, this still spits out a list that overfills the terminal, and overwhelms the user.
Another way might be able to default a certain namespace as the only one visible?
so a task --list would, by default, only show the dev: namespace, or something?
Either way, thanks for the awesome tool!