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

feat: task list --json output #1434

Open
jjjermiah opened this issue May 23, 2024 · 2 comments
Open

feat: task list --json output #1434

jjjermiah opened this issue May 23, 2024 · 2 comments
Labels
✨ enhancement Feature request

Comments

@jjjermiah
Copy link
Contributor

jjjermiah commented May 23, 2024

Problem description

This idea is inspired from the list --json and provides some ground work for new features regarding the tasks:

  1. one of the features for the vscode extension is creating a Task Provider where users can easily run tasks for a project.

    proof of concept

    image

    Ideally, I'd like to add separators in the dropdown menu for environments and features, and the user can start typing either of them and vscode will match on any of those fields.

  2. As my projects grow, it actually becomes pretty difficult to remember what all my tasks do, and passing as many people work on it, it would be useful to provide context without peers needing to sift through the config file. There was a good idea to Add descriptions to tasks #1113 , and taking that a step further I think it might be helpful to give users a structured understanding of the tasks as well through a tree breakdown.

    proof of concept `tree`

    image

I think both of these would greatly benefit from a structured description of the tasks. just fooling around with the code, I started with mirroring the way the packagetojson works with whatever information was stored:

proof of concept

image

I think we would just need to add some information regarding which environment and feature the task belongs to.

high level representation?
{
  "envs": [
    {
      "<ENVIRONMENT_NAME>": [
        {
          "<FEATURE_NAME>": [
            {
              "<TASK_NAME>": {
              ...
              }
            },
            {
              "<TASK2_NAME>": {
              ...
              }
            }
          ]
        },
        {
          "<FEATURE2_NAME>": [
            {
              "<TASK3_NAME>": {
              ...
              }
            }
          ]
        }
      ]
    },
    {
      "<ENVIRONMENT2_NAME>": [
        {
          "<FEATURE3_NAME>": [
            {
              "<TASK_NAME>": {
              ...
              }
            }
          ]
        }
      ]
    }
  ]
}
@jjjermiah jjjermiah added the ✨ enhancement Feature request label May 23, 2024
@jjjermiah
Copy link
Contributor Author

jjjermiah commented May 23, 2024

additional vscode extension feature, similar to the npm scripts :

image

@jjjermiah
Copy link
Contributor Author

Posting as an idea right now, as I realized this can get very complicated very quickly:

  1. in my case, the environments are exclusive for the most part, features dont belong to multiple environments
  2. it looks like there are different types of tasks (Plain, Execute, Alias, Custom).
  3. I have yet to implement a pixi.feature.target.<platform>.task but that might need to be accounted for if those are exclusive to platforms.

in general I think the structured output can just be exhaustive but looking for insight on if there are any glaring flags in this idea

@jjjermiah jjjermiah changed the title feat: task json output feat: task list --json output Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Feature request
Projects
None yet
Development

No branches or pull requests

1 participant