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: common path prefix #95

Open
nevvermind opened this issue May 21, 2015 · 4 comments
Open

Feature request: common path prefix #95

nevvermind opened this issue May 21, 2015 · 4 comments

Comments

@nevvermind
Copy link

When creating modules, we usually put all its files under src, because we may have some tests, unrelated files in the repo etc. and we want to keep them separated. But we want to keep the modman file at the repo's top level as well.
So we end up mirroring the folder structure except the src part, which we always have to append.

Would it be difficult (and I mean BC breaks here) to add a common source folder once and the bash script prepends it on every subsequent source path? For exampled, instead of

src/app/code/community/MX/*          app/code/community/MX/
src/app/etc/modules/MX_Module1.xml   app/etc/modules/

... we could use this type of declaration (without mentioning the target path):

#[source="src/"]
app/code/community/MX/
app/etc/modules/

Like a dynamic CHDIR.

PS: The comment-syntax is completely bogus. No idea what syntactic constraints are there.

@colinmollenhour
Copy link
Owner

Makes sense, but currently modman syntax is more or less working with composer and this new feature would break the compatibility with composer.. Not a huge issue really but it would add confusion for some people when they are using an old version and their modman files suddenly don't work. Also more documentation needed to explain the feature, etc.. So I personally would rather keep it simple/compatible and have slightly more verbose modman files. Would like to hear more people's opinions though.

One alternative (also not composer compatible but at least is already supported) is to have the root modman file like this:

@import src/

And then another modman file inside of src/:

app/code/community/MX/
app/etc/modules/

@riconeitzel
Copy link

What about a system variable setting this and modman checks for that? That would mean it's system wide but at least it's something

On 21 May 2015, at 18:30, Colin Mollenhour notifications@github.com wrote:

Makes sense, but currently modman syntax is more or less working with composer and this new feature would break the compatibility with composer.. Not a huge issue really but it would add confusion for some people when they are using an old version and their modman files suddenly don't work. Also more documentation needed to explain the feature, etc.. So I personally would rather keep it simple/compatible and have slightly more verbose modman files. Would like to hear more people's opinions though.

One alternative (also not composer compatible but at least is already supported) is to have the root modman file like this:

@import src/
And then another modman file inside of src/:

app/code/community/MX/
app/etc/modules/

Reply to this email directly or view it on GitHub.

@nevvermind
Copy link
Author

@riconeitzel - It needn't be system-wide. It can be process-specific as well: MODMAN_SRC=./src sh modman deploy. Although I'm a little reluctant to use an env var because of the magic it brings, it's an option.

@colinmollenhour
Copy link
Owner

Using system variables would make distribution a nightmare. I think "modman clone X" should be all that is ever required to deploy a module. Also this has the same problems regarding compatibility with composer. So the original proposal is not a bad one, just wanted to offer an alternative that already is possible to use without adding more features that composer will not support.

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

3 participants