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] Support for Hierarchical Folder Structures in .moon/tasks #1066

Closed
Jad31 opened this issue Sep 22, 2023 · 3 comments
Closed

[feature] Support for Hierarchical Folder Structures in .moon/tasks #1066

Jad31 opened this issue Sep 22, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Jad31
Copy link
Contributor

Jad31 commented Sep 22, 2023

Is your feature request related to a problem? Please describe.

The problem is related to the organization of task files in the .moon/tasks directory. Currently, if tag tasks files are placed inside a subfolder, moon defaults to the first match it finds in the .moon/tasks directory instead of respecting the structure and traversing through subfolders. For instance, when an Angular application (which is also of type node) exists, it defaults to the node.yml file if the tag-angular-application.yml inside a subfolder. Also, it seems like only task files at the root of the .moon/tasks folder are detected by moon.

Describe the solution you'd like

I'd like moon to support hierarchical folder structures inside .moon/tasks. If task files are placed within subdirectories, moon should prioritize files based on the correct order (i.e., tag-specific > language-specific) regardless of the directory structure.

Currently, the folder structure is:

.moon/tasks/
  | tag-angular-application.yml
  | tag-angular-library.yml  
  | node-application.yml
  | node-library.yml
  | tag-nestjs-application.yml
  | tag-nestjs-library.yml
  | typescript.yml

I'd like the structure to be:

.moon/tasks/
  | angular
    | tag-angular-application.yml
    | tag-angular-library.yml  
  | node
    | node-application.yml
    | node-library.yml
  | nestjs
    | tag-nestjs-application.yml
    | tag-nestjs-library.yml
  | rust
    | ...
  | typescript.yml

Describe alternatives you've considered

The only current solution is to flatten the folder structure. While this approach works, it hinders organized categorization, especially when dealing with a large number of task files.

Additional context

The aim is to make the management of task files more intuitive and structured, especially for projects that make use of various languages and tags. The suggested feature would streamline this process and reduce the cognitive overhead for developers.

@Jad31 Jad31 added the enhancement New feature or request label Sep 22, 2023
@milesj
Copy link
Collaborator

milesj commented Sep 22, 2023

The way it works right now, is that inheritance matches against the file name and disregards the rest of the path. I also glob with tasks/*.yml, so I think if I just change the glob to tasks/**/*.yml, adding folders should just work.

@milesj
Copy link
Collaborator

milesj commented Sep 22, 2023

#1067

@milesj
Copy link
Collaborator

milesj commented Sep 25, 2023

In v1.4!

@milesj milesj closed this as completed Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants