The Crystal Programming Language Forum

Error resolving db (~> 0.7.0, ~> 0.7.0, ~> 0.6.0)

I had Posrgres (will/crystal-pg) working before in my Kemal project. I recently add a spec test for a Postgres data provider I wrote. However, now it seems when I do a shards install I’m getting this error:

Fetching https://github.com/kemalcr/spec-kemal.git
Fetching https://github.com/kemalcr/kemal.git
Fetching https://github.com/luislavena/radix.git
Fetching https://github.com/jeromegn/kilt.git
Fetching https://github.com/crystal-loot/exception_page.git
Fetching https://github.com/crystal-lang/crystal-db.git
Fetching https://github.com/will/crystal-pg.git
Fetching https://github.com/vladfaust/migrate.cr.git
Error resolving db (~> 0.7.0, ~> 0.7.0, ~> 0.6.0)

I’ve tried to update my shards.yml to:

dependencies:
  spec-kemal:
    github: kemalcr/spec-kemal
  kemal:
    github: kemalcr/kemal
  db:
    github: crystal-lang/crystal-db
    version: "~> 0.7.0"
  pg:
    github: will/crystal-pg
  migrate:
    github: vladfaust/migrate.cr
    version: "~> 0.5.0"

crystal: 0.30.1

However it doesn’t seem to matter. Am I specfifying the desired crystal-db version correctly? Anyone else experience this problem?

migrate.cr seems to depend on crystal-db 0.6

You will need to upgrade that (tell the author to do it or send a PR for it).

1 Like

Ah, okay. I can see that here: https://github.com/vladfaust/migrate.cr/blob/master/shard.yml#L12-L14

Thanks for the info!

It would be nice if shards mentioned where the conflicting requirements come from :)

3 Likes

@ejstembler during the release we took care of submitting a patch in https://github.com/amberframework/micrate/pull/40 among others.

Awesome!

It looks like you bumped the module version to 0.3.1:

module Micrate
  VERSION = "0.3.1"
end

But the shard.yml has 0.3.3:

name: micrate
version: 0.3.3

Is that right?

Not me. That PR describes a bit the state of the repo and why the PR shows multiple commit. I am the author of only the changes to update to crystal-db 0.7.0