You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it is a good idea. On the other hand, I am afraid backwards-incompatibility will prevent users from upgrading and might be risky for them. So if we can come up with a smooth migration path it can be helpful. Another alternative is to support both jdk/joda somehow without having to maintain two branches.
sad but true: joda-time need to be dropped. And I think it makes sense to do it as soon as possible, because it is going to be breaking change and number of affected users should be as small as possible. Options on how to implement this change are:
Radical(preferable):
major release (or at least version 1.1) and just remove all joda-time references
Soft:
deprecate all public API which currently returns joda-time and add new methods which will use java.time.*
announce that deprecated API will be dropped in future major release
drop deprecated api together with joda-time dependency in next major release
The second alternative is really not feasible for that lib. joda time can be returned from rows in result set so it is hard to replace it there and can be given as a parameter to a prepared statement.
Another idea is to have some kind of "feature flag" that based on that we will decide which one to use.
Then users can pick which one they want, and in case they do not want joda they will have to exclude it from the dependency in gradle/maven.
no... excluding dependency is dirty and complicated. Only 1% of users will do it I believe... Only those who care about classpath size. I would try to go with more radical way then, since library is really young and there are not a lot users yet.
The library is almost 1 year old and it is a fork of mauricio lib that existed since 2012. We want to allow easy migration from the original lib if possible. I guess the original one has many users.
So from my perspective, it is better to allow an easy and safe migration path if possible.
The question is what will be the benefit of such a move? From my perspective, it can be avoiding classpath collisions and moving to the standard api. Other than that, I don't see great benefits from that change. Are there?
So although I think it is a good idea (as I mentioned above) I am pretty reluctant to go with the radical approach at the moment.
I am still open to other ideas about how to do the migration.
How about change dependency from a requirement to an optional one? Like compileOnly('...joda-time...'), that means if user dependent on joda, than enable joda, otherwise disable for default.
Than, user can just upgrade jasync-sql version and add a dependency of joda rather than change their code.
The question is what will be the benefit of such a move? From my perspective, it can be avoiding classpath collisions and moving to the standard api. Other than that, I don't see great benefits from that change. Are there?
I think that moving to it while not maintaining compatibility in such a way (you will not get compilation errors, but failures on runtime) is not ideal, even for version 2.0. In addition, I don't have the capacity for such a change at the moment. So if anyone wants to pick it up we can discuss concrete plans.
I believe that this thread is exactly about plan discussion and understanding if this is necessary and doable at all. After decision made, someone will pick it and implement it. So my ideal proposal:
version 2.0 with breaking change just removing joda time and providing instructions on how to upgrade.
➕ to moving out of JodaTime. For now I have to keep these extension functions around, but even with them the code gets bloated with back-and-forth conversions between java.time.* and Joda classes.
IMO, I would also never close an issue like this. The fact that the main maintainer does not have capacity does not mean that the library is already perfect and has no issues that need to be addressed.
I prefer to keep open issues for bugs, or features actively developed. We used to have a TODO list, and there are also known issues in the wiki, so we can also keep it there. This issue still waits for someone to pick it up, the main progress that was done until now is #157.
Activity
oshai commentedon Jun 30, 2019
I think it is a good idea. On the other hand, I am afraid backwards-incompatibility will prevent users from upgrading and might be risky for them. So if we can come up with a smooth migration path it can be helpful. Another alternative is to support both jdk/joda somehow without having to maintain two branches.
xp-vit commentedon Jul 1, 2019
sad but true: joda-time need to be dropped. And I think it makes sense to do it as soon as possible, because it is going to be breaking change and number of affected users should be as small as possible. Options on how to implement this change are:
oshai commentedon Jul 3, 2019
The second alternative is really not feasible for that lib. joda time can be returned from rows in result set so it is hard to replace it there and can be given as a parameter to a prepared statement.
Another idea is to have some kind of "feature flag" that based on that we will decide which one to use.
Then users can pick which one they want, and in case they do not want joda they will have to exclude it from the dependency in gradle/maven.
xp-vit commentedon Jul 3, 2019
no... excluding dependency is dirty and complicated. Only 1% of users will do it I believe... Only those who care about classpath size. I would try to go with more radical way then, since library is really young and there are not a lot users yet.
oshai commentedon Jul 3, 2019
The library is almost 1 year old and it is a fork of mauricio lib that existed since 2012. We want to allow easy migration from the original lib if possible. I guess the original one has many users.
So from my perspective, it is better to allow an easy and safe migration path if possible.
The question is what will be the benefit of such a move? From my perspective, it can be avoiding classpath collisions and moving to the standard api. Other than that, I don't see great benefits from that change. Are there?
So although I think it is a good idea (as I mentioned above) I am pretty reluctant to go with the radical approach at the moment.
I am still open to other ideas about how to do the migration.
mirromutth commentedon Jul 31, 2019
How about change dependency from a requirement to an optional one? Like
compileOnly('...joda-time...'), that means if user dependent on joda, than enable joda, otherwise disable for default.Than, user can just upgrade jasync-sql version and add a dependency of joda rather than change their code.
oshai commentedon Jul 31, 2019
Thats ok, but the code should be changed as well to work in both scenarios without throwing class not found exception.
ratcashdev commentedon Aug 22, 2019
how about introducing version 2.x that won't be using joda.time?
oshai commentedon Aug 22, 2019
As I mentioned above:
I think that moving to it while not maintaining compatibility in such a way (you will not get compilation errors, but failures on runtime) is not ideal, even for version 2.0. In addition, I don't have the capacity for such a change at the moment. So if anyone wants to pick it up we can discuss concrete plans.
xp-vit commentedon Aug 22, 2019
I believe that this thread is exactly about plan discussion and understanding if this is necessary and doable at all. After decision made, someone will pick it and implement it. So my ideal proposal:
oshai commentedon Nov 17, 2019
Here is an example of another library that used gradle modules to decide on the implementation: https://github.com/JetBrains/Exposed/wiki/LibDocumentation#exposed-0181-and-higher
github-actions commentedon May 14, 2020
Stale issue message
ilya40umov commentedon Sep 5, 2020
➕ to moving out of JodaTime. For now I have to keep these extension functions around, but even with them the code gets bloated with back-and-forth conversions between
java.time.*and Joda classes.IMO, I would also never close an issue like this. The fact that the main maintainer does not have capacity does not mean that the library is already perfect and has no issues that need to be addressed.
oshai commentedon Sep 6, 2020
I prefer to keep open issues for bugs, or features actively developed. We used to have a TODO list, and there are also known issues in the wiki, so we can also keep it there. This issue still waits for someone to pick it up, the main progress that was done until now is #157.