Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Allow specification of module dependencies for appups #139

Merged
merged 1 commit into from
Mar 5, 2014
Merged

Allow specification of module dependencies for appups #139

merged 1 commit into from
Mar 5, 2014

Conversation

rnewson
Copy link
Contributor

@rnewson rnewson commented Sep 19, 2013

The order in which modules, within an application, are loaded can be
important. This patch adds allows the specification of module
dependencies such that generate .appup/.relup scripts will load a
module's dependent modules before itself.

To use:

in rebar.config, add a module_deps

{module_deps, [{ModuleName, [DependentModuleName, ...]}]}.

ModuleName is the name of any module, followed by a list of module
names that it depends on.

@ghost
Copy link

ghost commented Sep 19, 2013

@joewilliams?

@joewilliams
Copy link
Contributor

+1

@rnewson
Copy link
Contributor Author

rnewson commented Sep 20, 2013

I'm going to enhance this a little. appup generation fails if one of the module dependencies isn't being updated, which makes managing the {module_deps ...} tuple rather onerous. Instead, I'll filter out the dependencies that aren't changing, then the module_deps list is more static, changing only when new modules are created. Won't take long.

The order in which modules, within an application, are loaded can be
important. This patch adds allows the specification of module
dependencies such that generate .appup/.relup scripts will load a
module's dependent modules before itself.

To use:

in rebar.config, add a module_deps

{module_deps, [{ModuleName, [DependentModuleName, ...]}]}.

ModuleName is the name of any module, followed by a list of module
names that it depends on.
@rnewson
Copy link
Contributor Author

rnewson commented Sep 20, 2013

There.

@joewilliams
Copy link
Contributor

Thanks @rnewson this seems like a good patch.

@rnewson
Copy link
Contributor Author

rnewson commented Sep 20, 2013

cheers, certainly seems to do the trick for me. Is it tidy enough for your tastes? e.g, https://github.com/rebar/rebar/pull/139/files#L0R155

@joewilliams
Copy link
Contributor

Yeah, a little funky but works for me. Thanks man.

@jaredmorrow
Copy link
Contributor

@joewilliams knows more about app ups than anyone else, so that's good enough for me.

jaredmorrow added a commit that referenced this pull request Mar 5, 2014
Allow specification of module dependencies for appups
@jaredmorrow jaredmorrow merged commit a361719 into rebar:master Mar 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants