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

Add a User Local Cache #389

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Add a User Local Cache #389

wants to merge 4 commits into from

Conversation

coderoshi
Copy link

WIP

This adds a local cache onto rebar, which is a directory (~/.rebar/cache) where dependencies are housed. When a project builds

TODO:

  • Add a configuration to turn this on. Make it off by default
  • After N timeouts, set a remote source (ie. github) as "unreachable", and give up on updates, and rely entirely on cache. This allows continued development when github goes down. Which it will. Again.
  • Separate the steps between pulling repo information and copying deps into a local project. This allows an analyze step, to build a dependency graph for analysis, namely: dependency cycles, version collisions, and pruning. With a graph, adding a dependency override option also become easier.
  • Currently, a dep's source is updated on every build. This will continue without a version freeze/lock. Sadface. Build that into rebar.
  • There's a danger of name collision, since rebar has no concept of groups or namespaces. Either add groups to rebar, or extract an optional group name from the repo (eg. basho).

@sinasamavati
Copy link

+1

I noticed that it doesn't use the publisher name which is so important.
What I'm doing in Mad is putting repositories in ~/.mad/repos/[publisher]/[repo] just to make it able to cache forks of a repository. For example, perhaps, I wanna use my fork of X in a project, whereas, someday in the future I'll use other projects that are based on the original version of X, so what's gonna happen is that rebar gets my own fork of X even for those projects that need the original version.

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