Skip to content
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

Feature Request: Recipe grouping #1776

Closed
nefrob opened this issue Dec 24, 2023 · 8 comments
Closed

Feature Request: Recipe grouping #1776

nefrob opened this issue Dec 24, 2023 · 8 comments

Comments

@nefrob
Copy link

nefrob commented Dec 24, 2023

Consider allowing recipes to be aded to groups. For example, using the existing recipe attributes format:

[group:lint]
format:
 ...

[group:lint]
check:
  ...

[group:build]
build:
  ...

and listed by group when calling just --list, ex.

Available recipes:
    [lint]
    format
    check
    
    [build]
    build

    [default]
    ...

List groups via just --groups, ex.

Groups:
  lint
  build
  default (undecorated recipes could fall in this group or this can be dropped)

There might be desire to allow recipes to be part of multiple groups, so this could be considered in the implementation but should not be an initial requirement.

This might also be a way to solve: #1652. All recipes from a group could be executed at once rather than needing to match on recipe name.

@neunenak
Copy link
Contributor

This is a feature I'd like to have myself and I've started a PR working on it #1842

@kranurag7
Copy link

Hey @neunenak
As a user, I would like to have all import in one group.

$ tree .
.
├── justfile
└── justfiles
    ├── docker.justfile
    ├── gh.justfile
    ├── git.justfile

So, as per the format above, I'll have to add attributes in each of the recipe inside docker.justfile to have it included inside docker group. But it would be easier we can group based on imports as well.

I think this can be a separate issue since this issue is about having attribute set on an individual recipe.

Thanks for working on it.

@casey
Copy link
Owner

casey commented Jan 13, 2024

I think it'll be easy to add make [group: foo] work on imports in a follow-up PR.

@laniakea64
Copy link
Contributor

Will these recipe groups have additional functionality beyond cosmetically improving list output?

For example, if #626 is implemented, will recipe groups be used to define which recipes could be run in parallel and which recipes have to stay sequential?

@marcbria
Copy link

marcbria commented Feb 9, 2024

It's cosmetic (helping a lot with the usability when you have long list) but not only.
#1614 is kind of related.

@neunenak
Copy link
Contributor

#1842 is merged now. I think the suggestion in #1776 (comment) of having there be a way to tag imports with a group would be useful and I want to try to get that in as a follow-up PR, so I think it's worth keeping this issue open.

@casey
Copy link
Owner

casey commented May 25, 2024

@neunenak I wanted to make a more specific issue, so I opened #2087 and #2086.

@casey casey closed this as completed May 25, 2024
@epicserve
Copy link

@casey,

I didn't realize that @neunenak's PR #1842 wouldn't work with imports. #2087 is a must for our company. We have a base import that we use on all projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants