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

Caching Shards? #181

Closed
Kentoseth opened this issue Oct 30, 2017 · 5 comments
Closed

Caching Shards? #181

Kentoseth opened this issue Oct 30, 2017 · 5 comments

Comments

@Kentoseth
Copy link

I am copy/pasting this issue from Amber - here

As this is an issue with shards and not amber.

Description

Is it possible to cache the shards and then share those saved packages across different projects (when creating a new project)?

Currently when I attempt to create 2 or 3 different projects, it is re-downloading the same shards each time, whereas I already have them all downloaded locally.

If this doesn't exist already, it can be considered a feature

Steps to Reproduce

  1. amber new blog1
  2. Now in an alternative directory: amber new blog2
  3. I tried to copy/paste both lib/ and .shards/ each to a new project, but when running shards install it still re-downloads the shards.
  4. I also tried to create a project within an existing-project (assuming shards would be fetched upstream), but it still downloads the shards

Expected behavior: [What you expect to happen]

It should be possible to cache and share packages across projects (or cache the projects at a higher level and let different projects fetch from the cache first)

Actual behavior: [What actually happens]

Shards are downloaded repeatedly.

Reproduces how often: [What percentage of the time does it reproduce?]

Every time.

Versions

You can get this information from copy and pasting the output of amber --version and amber --version from the command line. Also, please include the OS and what version of the OS you're running.

Amber CMD (amberframework.org) - v0.3.0
Crystal 0.23.1

@ysbaddaden
Copy link
Contributor

Duplicate of #180.

Also, shards are already cached, but locally to a project, and only reinstalled when it's needed.

@Kentoseth
Copy link
Author

@ysbaddaden is it possible for me to copy shards from 1 project to another? I am using the same shards for amber projects repeatedly.

@ysbaddaden
Copy link
Contributor

Yes. That would avoid full clones, but won't prevent running "git fetch" to make sure we have up to date repository versions.

@Kentoseth
Copy link
Author

Kentoseth commented Nov 3, 2017

@ysbaddaden

which folders must I copy specifically?

.shards/
&&
lib/

?

@ysbaddaden
Copy link
Contributor

.shards will suffice. It contains the full Git clones. The lib folder will be populated from them.

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

2 participants