instructor_ex icon indicating copy to clipboard operation
instructor_ex copied to clipboard

Dependency conflict

Open eugkhp opened this issue 1 year ago • 4 comments
trafficstars

I'm new to mix/elixir and when I was trying to add the dependency it failed with an error

Resolving Hex dependencies...
Resolution completed in 0.253s
Because the lock depends on swoosh 1.16.9 which depends on req ~> 0.5 or ~> 1.0, the lock requires req ~> 0.5 or ~> 1.0.
And because every version of instructor depends on req ~> 0.4.0, the lock is incompatible with instructor.
And because your app depends on the lock, no version of instructor is allowed.
So, because your app depends on instructor ~> 0.0.5, version solving failed.

Is it something I could solve on my end or the req version should be updated in instructor?

eugkhp avatar Sep 11 '24 20:09 eugkhp

Should be related to this PR here: https://github.com/thmsmlr/instructor_ex/pull/59

stryderjzw avatar Sep 11 '24 22:09 stryderjzw

Hmm, looks like it was merged 3 month ago, am I using the wrong version?

eugkhp avatar Sep 12 '24 10:09 eugkhp

https://github.com/thmsmlr/instructor_ex/releases/tag/v0.0.5

The latest version was before this PR. Since then, there hasn't been a release yet.

To make it work, you can use the main branch for now.

stryderjzw avatar Sep 12 '24 18:09 stryderjzw

Oooh, I see, thanks

eugkhp avatar Sep 12 '24 21:09 eugkhp

Loved trying out Instructor in Livebook but facing a dependency conflict between Swoosh and Instructor over different versions of Req. Any guidance on how to resolve this would be greatly appreciated!

Updating instructor (https://github.com/thbar/instructor_ex.git - main) remote: Enumerating objects: 444, done. remote: Counting objects: 100% (183/183), done. remote: Compressing objects: 100% (47/47), done. remote: Total 444 (delta 156), reused 136 (delta 136), pack-reused 261 (from 1) Resolving Hex dependencies... Resolution completed in 0.132s Because the lock depends on swoosh 1.17.2 which depends on req ~> 0.5 or ~> 1.0, the lock requires req ~> 0.5 or ~> 1.0. And because your app depends on the lock, req ~> 0.5 or ~> 1.0 is required. So, because your app depends on req ~> 0.4.0, version solving failed.

BhargavaSwamy avatar Oct 21 '24 20:10 BhargavaSwamy

@BhargavaSwamy try mix deps.unlock swoosh then mix deps.get

Azraiths avatar Oct 30 '24 03:10 Azraiths

@Azraiths - Tried your solution and Instructor is now working in my project. Thank you for helping out!

BhargavaSwamy avatar Oct 30 '24 07:10 BhargavaSwamy

It works with swoosh version 1.16, just unlock swoosh and then change the version to 1.16 if you use a higher version.

ospaarmann avatar Dec 07 '24 15:12 ospaarmann

@ospaarmann - Thank you !

BhargavaSwamy avatar Dec 07 '24 15:12 BhargavaSwamy

Solved in the latest release, {:instructor, "~> 0.1.0"}

thmsmlr avatar Feb 09 '25 19:02 thmsmlr