florinpatrascu / bolt_sips

Neo4j driver for Elixir
Apache License 2.0
256 stars 49 forks source link

DBConnection from Hex #48

Closed nihalgonsalves closed 5 years ago

nihalgonsalves commented 5 years ago

We'd like to stop overriding DBConnection everywhere in our app. In the process of upgrading our outdated dependencies, something broke and another library stopped working due to it expecting a different method in DBConnection. db_connection 1.1.3 was released on 13/01/2018 on Hex - is this a recent enough version for bolt_sips, and if so, can bolt_sips's mixfile be updated to use the Hex package?

florinpatrascu commented 5 years ago

@nihalgonsalves - please see this comment, on #39 We cannot publish a newer version to hex, until the work in the db-connection master branch is becoming a public hex package, sorry.

nihalgonsalves commented 5 years ago

@florinpatrascu oh alright, thanks! To prevent these kind of conflicts, maybe it makes sense to fork DBConnection and use a different OTP name for its dependency in Bolt-Sips?

If not we're stuck not being able to upgrade various packages because plenty of things depend on DBConnection.

florinpatrascu commented 5 years ago

maybe it makes sense to fork DBConnection and use a different OTP name for its dependency in Bolt-Sips?

definitely not. db_connection is not far from being published, and I wouldn't fork it to just end up bringing in updates, maintaining an out of sync clone basically, which defies the purpose of your proposal.

If not we're stuck not being able to upgrade various packages because plenty of things depend on DBConnection.

Wouldn't override dependency option help, in your case? See: module-dependency-definition-options

nihalgonsalves commented 5 years ago

definitely not. db_connection is not far from being published, and I wouldn't fork it to just end up bringing in updates, maintaining an out of sync clone basically, which defies the purpose of your proposal.

I meant that as more of a stop-gap until db_connection is published. If you say it's close to release, then its fine I suppose.

Wouldn't override dependency option help, in your case?

Unfortunately, no. override only helps if you have a resolution mismatch and want to force a different version. However, if something actually depends on functionality not there in the overridden version, it doesn't help and the override causes compile and runtime errors.

florinpatrascu commented 5 years ago

Bolt.Sips v1.0.0-rc2, available at hex.pm