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

Fix seth/rebar_lock_deps_plugin/issues/16. #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

efine
Copy link
Contributor

@efine efine commented Jan 31, 2015

Consider a directory layout like this:

apps/lexer/rebar.config
     parser/rebar.config
     codegen/rebar.config
deps/*/rebar.config
rel/
rebar.config

The top-level rebar.config specifies {sub_dirs, ["rel", "apps/*"]},
and each rebar.config has its own set of deps.

rebar_lock_deps_plugin does not lock the dependencies specified in the
apps/{lexer,parser,codegen}/rebar.config files. This is a major issue
for certain projects of mine.

This difficulty arises because rebar_lock_deps_plugin apparently does
not scan sub_dir directories for dependencies. Since rebar itself
does scan sub_dir directories for dependencies, it seems reasonable
to expect that rebar_lock_deps_plugin would do it, too.

Consider a directory layout like this:

apps/lexer/rebar.config
     parser/rebar.config
     codegen/rebar.config
deps/*/rebar.config
rel/
rebar.config

The top-level `rebar.config` specifies `{sub_dirs, ["rel", "apps/*"]},
and each `rebar.config` has its own set of `deps`.

`rebar_lock_deps_plugin` does not lock the dependencies specified in the
`apps/{lexer,parser,codegen}/rebar.config` files. This is a major issue
for certain projects of mine.

This difficulty arises because `rebar_lock_deps_plugin` apparently does
not scan `sub_dir` directories for dependencies. Since `rebar` itself
_does_ scan `sub_dir` directories for dependencies, it seems reasonable
to expect that `rebar_lock_deps_plugin` would do it, too.
{filename:basename(D), dep_names(extract_deps(D))}
|| D <- DepDirs ].
Acc ++ [{filename:basename(D), dep_names(extract_deps(D))}
|| D <- DepDirs].
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent looks off here? maybe a hard tab?

@seth
Copy link
Owner

seth commented Feb 2, 2015

Hiya. Thanks for this PR.

Would you be willing to add a small test case that could be used to verify the behavior? I know the current test coverage isn't great, but no time like the present to improve that :)

A few minor comments and since I merged your other fix this now needs a rebase. But I like the idea of teaching the plugin how to handle nested projects as you have.

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

Successfully merging this pull request may close these issues.

2 participants