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] Recursively search packs directory for valid packs #352

Open
4 tasks done
astrsh opened this issue Jul 22, 2022 · 1 comment · May be fixed by #353
Open
4 tasks done

[Feature] Recursively search packs directory for valid packs #352

astrsh opened this issue Jul 22, 2022 · 1 comment · May be fixed by #353
Labels
Note: Good First Issue Good for anyone looking to learn the internals of Terra Status: Pending Issue/PR is currently awaiting approval by a moderator. Type: Enhancement A request for a new feature or enhancement to be added.

Comments

@astrsh
Copy link
Member

astrsh commented Jul 22, 2022

Pre-Request Checklist

  • I have checked that I am on the latest version of Terra.
  • I have searched github for similar features requests, including closed
    ones, and found none.
  • I believe this is within the scope of Terra.
  • This feature request is for all of Terra, and isn't something that
    should be implemented by a pack or addon.

Feature Description

Allow packs to be placed in arbitrary directory structures within the packs directory, where the requirement for a folder to be loaded as a pack is that it immediately contains a pack.yml.

An example of a valid setup:

packs
  some-config-pack-set
    pack-1
      pack.yml
      ...
    pack-2.zip
      pack.yml
      ...
  another-pack-set.zip
    some-folder
      pack-a
        pack.yml
        ...
      pack-b
        pack.yml
        ...

pack-1, pack-2.zip, pack-a, and pack-b would be loaded as config packs.

What Problem Does This Solve?

I feel like pack installation is needlessly complicated because of the strict requirement of where the manifest should be - this would allow installation of packs to be simpler for end users. In many cases you could just download the source of a pack directly from github and drop it in the packs directory without worrying about the directories being nested.

A Solution You'd Like

Run a BFS on folders and zips contained in the packs directory, and attempt to load any directories containing a pack.yml as a config pack. BFS would be terminated at directories identified as packs so pack subdirs aren't searched.

@astrsh astrsh added Type: Enhancement A request for a new feature or enhancement to be added. Note: Good First Issue Good for anyone looking to learn the internals of Terra Status: Pending Issue/PR is currently awaiting approval by a moderator. labels Jul 22, 2022
@astrsh
Copy link
Member Author

astrsh commented Jul 22, 2022

Also this wouldn't be a breaking change as the behavior would remain the same for existing setups. I think this should be slated for 6.2.1

@astrsh astrsh linked a pull request Jul 23, 2022 that will close this issue
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Note: Good First Issue Good for anyone looking to learn the internals of Terra Status: Pending Issue/PR is currently awaiting approval by a moderator. Type: Enhancement A request for a new feature or enhancement to be added.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant