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

shards build repeatedly fetches already satisfied dependencies #353

Closed
damianham opened this issue Apr 15, 2020 · 7 comments · Fixed by #361
Closed

shards build repeatedly fetches already satisfied dependencies #353

damianham opened this issue Apr 15, 2020 · 7 comments · Fixed by #361
Assignees
Labels

Comments

@damianham
Copy link

damianham commented Apr 15, 2020

When issuing a shards build target_name command the dependencies are fetched EVERY time even though
-- the dependencies are already installed in the lib folder and all dependencies are satisfied
-- the dependencies were satisfied only moments ago in the previous build command in the develop - build - debug cycle

Not a problem for people on super fast network in London/San Francisco but for digital nomads in far flung places it is a pain in the neck.

@straight-shoota
Copy link
Member

What version of shards are you using?

@damianham
Copy link
Author

damianham commented Apr 15, 2020

0.10.0 locally and 0.8.1 in production and in local development docker instances

@waj
Copy link
Member

waj commented Apr 17, 2020

@damianham can you share your shard.yml and shard.lock?

0.10 wasn't properly checking installed versions when locking without a release tag. This is hopefully fixed already for the next version.

@damianham
Copy link
Author

damianham commented Apr 18, 2020

shard.yml

name: smartboatnetwork
version: 0.1.0

authors:
  - Damian Hamill <damianham@gmail.com>

crystal: <%= Crystal::VERSION %>

license: private

targets:
  smartboatnetwork:
    main: src/smartboatnetwork.cr

  amber:
    main: lib/amber/src/amber/cli.cr

dependencies:
  amber:
    github: amberframework/amber
    #branch: master
    #version: <%= Amber::VERSION %>
    version: 0.33.0

  granite:
    github: amberframework/granite
    version: ~> 0.19.0

  quartz_mailer:
    github: amberframework/quartz-mailer
    version: ~> 0.5.4

  jasper_helpers:
    github: amberframework/jasper-helpers
    version: ~> 0.2.5

  amber_render_module:
    github: damianham/amber_render_module
    version: ~> 0.1.3

  pg:
    github: will/crystal-pg
    version: ~> 0.20.0

  citrine-i18n:
    github: amberframework/citrine-i18n
    version: ~> 0.4.0

  jwt:
    github: crystal-community/jwt
    version: ~> 1.4.0

development_dependencies:
  garnet_spec:
    github: amberframework/garnet-spec
    version: ~> 0.2.0

  ameba:
     github: veelenga/ameba
     version: ~> 0.11.0

shard.lock

version: 1.0
shards:
  amber:
    github: amberframework/amber
    version: 0.33.0

  amber_render_module:
    github: damianham/amber_render_module
    version: 0.1.3

  amber_router:
    github: amberframework/amber-router
    version: 0.3.0

  ameba:
    github: veelenga/ameba
    version: 0.11.0

  bindata:
    github: spider-gazelle/bindata
    version: 1.2.0

  callback:
    github: drujensen/callback
    version: 0.7.1

  citrine-i18n:
    github: amberframework/citrine-i18n
    version: 0.4.0

  cli:
    github: drujensen/cli
    version: 0.8.0

  compiled_license:
    github: elorest/compiled_license
    version: 0.1.3

  db:
    github: crystal-lang/crystal-db
    version: 0.8.0

  email:
    github: arcage/crystal-email
    version: 0.4.6

  exception_page:
    github: crystal-loot/exception_page
    version: 0.1.4

  garnet_spec:
    github: amberframework/garnet-spec
    version: 0.2.3

  granite:
    github: amberframework/granite
    version: 0.19.0

  i18n:
    github: TechMagister/i18n.cr
    version: 0.3.1

  inflector:
    github: phoffer/inflector.cr
    version: 0.1.8

  jasper_helpers:
    github: amberframework/jasper-helpers
    version: 0.2.5

  jwt:
    github: crystal-community/jwt
    version: 1.4.0

  kilt:
    github: jeromegn/kilt
    version: 0.4.0

  liquid:
    github: TechMagister/liquid.cr
    version: 0.3.2

  markd:
    github: icyleaf/markd
    version: 0.2.0

  micrate:
    github: amberframework/micrate
    version: 0.6.1

  mysql:
    github: crystal-lang/crystal-mysql
    version: 0.10.0

  openssl_ext:
    github: stakach/openssl_ext
    version: 1.2.0

  optarg:
    github: drujensen/optarg
    version: 0.7.0

  pg:
    github: will/crystal-pg
    version: 0.20.0

  pool:
    github: ysbaddaden/pool
    version: 0.2.3

  quartz_mailer:
    github: amberframework/quartz-mailer
    version: 0.5.4

  redis:
    github: stefanwille/crystal-redis
    version: 2.5.3

  selenium:
    github: ysbaddaden/selenium-webdriver-crystal
    version: 0.4.0

  shell-table:
    github: luckyframework/shell-table.cr
    commit: 078a04ea58ead5203bb435a3b5fff448ddabaeea

  slang:
    github: jeromegn/slang
    version: 1.7.1

  sqlite3:
    github: crystal-lang/crystal-sqlite3
    version: 0.15.0

  string_inflection:
    github: mosop/string_inflection
    version: 0.2.1

  teeplate:
    github: mosop/teeplate
    version: 0.8.0

@waj
Copy link
Member

waj commented Apr 18, 2020

Thanks @damianham!

In this case garnet_spec 0.2.3 has version 0.2.1 in shard.yml. Shards 0.10.0 checks the installed version from the shard.yml and thinks it's never properly installed. Next version will print a warning but continue running normally and it will check the dependency correctly.

So, this is already fixed!

@waj waj closed this as completed Apr 18, 2020
@waj
Copy link
Member

waj commented Apr 18, 2020

Actually, I'll reopen this and add a specific integration test to the suite to avoid regressions in the future.

@waj waj reopened this Apr 18, 2020
@damianham
Copy link
Author

@waj many thanks for your efforts, very much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants