How to support multiple depth levels in defining packs in rubyatscale/packs gem?

This message was imported from the Ruby/Rails Modularity Slack server. Find more info in the import thread.

Message originally sent by slack user U71TN2WF04X

Hey :wave: I don’t know where to ask this so I’ll put it here.
I created a PR to the rubyatscale/packs gem, the idea is to support more depth in the definition of packs.
The problem: when defining a pack, if it is 3-levels or more, it is not defined.

packs/my_pack # good
packs/domain/other_pack # good
packs/big_domain/sub_domain/last_pack # bad

In my PR I propose to remove this constraint and allow multiple depth level (more than 2) packs

<@U71TN2WF04X> thank you for the contribution!

Could you set the pack_paths in your packs.yml (docs) to achieve this?

Message originally sent by slack user U71TN2WF04X

I had no idea that was possible :sweat_smile: my bad haha

Haha no problem – perhaps there’s an opportunity to improve the UX to make this more discoverable :pray:

Message originally sent by slack user U71TN2WF04X

Maybe the Configuration should be the first thing on the Readme? :thinking_face:

Good call, updated!

Only thing I wanted to caution you is if you’re using other tools in the toolchain (e.g. rubocop-packs), it’s possible that certain tools may not work for packs that are not in the default pack locations. e.g. Packs/RootNamespaceIsPackName may fail, bin/packs move packs/a/b/c packs/a may not work.

If you’re not using those, then no problem!

Eventually I’d like to get that all sorted out so all the tools work as expected with any level of nesting!

Message originally sent by slack user U71TN2WF04X

Good to know, as of now I am not using those tools, but eventually I will!

I would like to continue contributing to these tools, so I will take a look at them and how they work :wink: