jessedoyle / duktape.cr

Evaluate JavaScript from Crystal!
MIT License
137 stars 17 forks source link

Problem upgrading to Crystal 1.0 #68

Closed gummybears closed 3 years ago

gummybears commented 3 years ago

Hi,

I am trying to upgrade to Crystal 1.0, shards.yml is

dependencies:

  duktape:
    github: jessedoyle/duktape.cr

  sass:
    github: straight-shoota/sass.cr
    version: 0.6.0

  coffee-script:
    github: jessedoyle/coffee-script

Error I am getting is

Resolving dependencies
Fetching https://github.com/jessedoyle/duktape.cr.git
Fetching https://github.com/straight-shoota/sass.cr.git
Fetching https://github.com/jessedoyle/coffee-script.git
Unable to satisfy the following requirements:

- `crystal (< 1.0.0)` required by `duktape 0.21.0`
- `crystal (>= 0.28.0)` required by `sass 0.6.0`
- `crystal (< 1.0.0)` required by `coffee-script 0.6.0`
Failed to resolve dependencies, try updating incompatible shards or use --ignore-crystal-version as a workaround if no update is available.
gummybears commented 3 years ago

I removed my shards.lock and the lib sub directory and made some changes to shards.yml

dependencies:
  duktape:
    github: jessedoyle/duktape.cr
    version: ~> 1.0.0

  sass:
    github: straight-shoota/sass.cr
    version: 0.6.0

  coffee-script:
    github: jessedoyle/coffee-script
    version: ~> 0.6.0

Still no luck

Resolving dependencies
Fetching https://github.com/jessedoyle/duktape.cr.git
Fetching https://github.com/straight-shoota/sass.cr.git
Fetching https://github.com/jessedoyle/coffee-script.git
Unable to satisfy the following requirements:

- `duktape (~> 1.0.0)` required by `shard.yml`
- `duktape (~> 0.13)` required by `coffee-script 0.6.0`
Failed to resolve dependencies
gummybears commented 3 years ago

I am not an expert in using pessimistic version constraints but I think you made an error in the coffee-script shard.yml.

 github: jessedoyle/duktape.cr    
 version: ~> 0.13

So upgrading the duktape shard to 1.0.0 is not possible

jessedoyle commented 3 years ago

Hi @gummybears! Thanks for pointing that dependency version conflict out in the coffee-script shard.

This is a good catch, and we can definitely get a fix in for you!

I'm going to close the issue in this repo and move it over to the coffee-script repo as that's where the version incompatibility is.

jessedoyle commented 3 years ago

Hi @gummybears!

I just cut a new 1.0 version of coffee-script that should include a fix for this issue.

I was able to successfully install dependencies using the following shard.yml with Crystal 1.0.0:

name: test
version: 0.1.0
dependencies:
  duktape:
    github: jessedoyle/duktape.cr
  sass:
    github: straight-shoota/sass.cr
    version: 0.6.0
  coffee-script:
    github: jessedoyle/coffee-script
    version: ~> 1.0

Thanks again for reporting the issue!

gummybears commented 3 years ago

Hi @jessedoyle

I am a bit busy, but I will certainly make the change somewhere this week and will let you know. Thanks for making this shard, really helpfull and thanks for making the change.

gummybears commented 3 years ago

I made the suggested changes to my shard.yml and I can confirm I was able to successfully install your shard. Thanks