Closed arenrover0 closed 4 months ago
Here is a draft patch:
With this patch, if rebar.config contains:
{fast_tls, ">= 1.1.15", {git, "https://github.com/processone/fast_tls", {tag, "1.1.10"}}},
{fast_xml, ">= 1.1", {git, "https://github.com/processone/fast_xml", {tag, "1.1.20"}}},
Rebar2 follows dumbly the git tag:
Pulling fast_tls from {git,"https://github.com/processone/fast_tls", {tag,"1.1.10"}}
Pulling fast_xml from {git,"https://github.com/processone/fast_xml", {tag,"1.1.20"}}
Rebar3 gets the latest versions from Hex:
===> Fetching fast_tls v1.1.19
===> Fetching fast_xml v1.1.51
An umbrella project that uses the mix build tool, when it downloads ejabberd, it will use rebar3 to build ejabberd.
If that patch looks good, it should be applied to ejabberd and all the ejabberd dependencies... Starting with xmpp, which is the one you are facing the problem now.
@prefiks and anyboy else with knowledge in rebar.config: what do you think about that patch. Is the feature worth improving? Do you see any problem in the feature or the patch?
I've updated the xmpp library in its git repository, and also ejabberd. Now it is able to download the latest or other acceptable dependency versions:
$ make
rebar3 get-deps
===> Verifying dependencies...
===> Fetching ezlib v1.0.12
===> Fetching fast_tls v1.1.19
===> Fetching fast_xml v1.1.51
===> Fetching idna v6.1.1
===> Fetching p1_utils v1.0.25
===> Fetching stringprep v1.0.29
===> Fetching unicode_util_compat v0.7.0
...
Issue Description
I am encountering dependency conflicts in my Phoenix application that utilizes Ejabberd as a dependency. The issue arises when trying to use Timex for working with time. I receive the following error message:
Because the lock depends on xmpp 1.8.1 which depends on idna 6.0.0, the lock requires idna 6.0.0. And because hackney >= 1.17.0 depends on idna ~> 6.1.0, the lock is incompatible with hackney >= 1.17.0. And because tzdata >= 1.1.0 depends on hackney ~> 1.17, the lock is incompatible with tzdata >= 1.1.0. And because timex >= 3.7.8 depends on tzdata ~> 1.1, the lock is incompatible with timex >= 3.7.8. And because your app depends on the lock, timex >= 3.7.8 is forbidden. So, because your app depends on timex ~> 3.7.8, version solving failed.
Additionally, when attempting to use Timex version 3.7.7, I encounter the following error:
[error] GenServer :tzdata_release_updater terminating ** (UndefinedFunctionError) function :ssl.cipher_suites/0 is undefined or private (ssl 10.8.7) :ssl.cipher_suites() (hackney 1.15.2) /home/project/deps/hackney/src/hackney_ssl.erl:77: :hackney_ssl.ciphers/0 (hackney 1.15.2) /home/project/deps/hackney/src/hackney_ssl.erl:69: :hackney_ssl.connect/4 (hackney 1.15.2) /home/project/deps/hackney/src/hackney_connect.erl:277: :hackney_connect.do_connect/5 (hackney 1.15.2) /home/project/deps/hackney/src/hackney_connect.erl:47: :hackney_connect.connect/5 (hackney 1.15.2) /home/project/deps/hackney/src/hackney.erl:333: :hackney.request/5 (tzdata 1.0.5) lib/tzdata/http_client/hackney.ex:17: Tzdata.HTTPClient.Hackney.head/3 (tzdata 1.0.5) lib/tzdata/data_loader.ex:46: Tzdata.DataLoader.last_modified_of_latest_available/1 Last message: :check_if_time_to_update
Environment:
Attempts to Solve:
In an effort to resolve the dependency conflict, I explored alternative libraries such as calendar. Unfortunately, this library also relies on tzdata
Resolution Suggestion:
Given the dependency conflicts, one possible resolution could be to update the Ejabberd dependency to a version that is compatible with the other dependencies, particularly
idna
. This may involve checking for newer versions of Ejabberd that have resolved these compatibility issues.Alternatively, I'm open to suggestions from the community on how to resolve these dependency conflicts in a more effective manner.
Appreciation:
Before closing, I'd like to express my gratitude to the Ejabberd development team for their magnificent product and the hard work they've put into it. Thank you for providing such a valuable tool to the community.
Looking forward to your guidance and suggestions on resolving this issue.