ericlagergren / decimal

A high-performance, arbitrary-precision, floating-point decimal library.
https://godoc.org/github.com/ericlagergren/decimal
BSD 3-Clause "New" or "Revised" License
525 stars 62 forks source link

Decompose interface interfering and breaking #154

Open aarondl opened 4 years ago

aarondl commented 4 years ago

Hi Eric :)

This issue has been a long-standing thorn in our side: https://github.com/volatiletech/sqlboiler/issues/803 https://github.com/volatiletech/sqlboiler/issues/607

Problem begins here (I think): https://github.com/ericlagergren/decimal/commit/50723dcdd23ab847e98361304620c97b0a7e177c

We've been telling people to pin at the last tagged version (v3.3.1) and this works because there hasn't been a new tag in quite a long time (that's the latest).

So two questions/problems:

Just wanted to get the ball rolling on this issue.

ericlagergren commented 4 years ago

I suppose it might make sense to drop decomposer support, or have a separate branch for it. Seems to have caused more trouble than benefits.

kardianos commented 4 years ago

@aarondl I'm looking into the issue as well.

hamstah commented 4 years ago

Hi, Is this still being considered? Is there a way I can help resolve it? Thanks!

kardianos commented 3 years ago

Sorry for the delay. This summer was shot.

I analyzed the problem: https://github.com/golang/go/issues/30870#issuecomment-717358078

I would prefer to update database drivers to support decimal values using the decomposer. But it really depends on what the community want to do.

hamstah commented 3 years ago

@kardianos great thanks! Will follow the item there.

zhongduo commented 1 year ago

Hi team, while I appreciate the great effort to formalize decimal in Go. I really doubt the proposal will go anywhere considering the fact that it has been open for 3 years by now. At this point I think we should simply revert the decompose interface in this repo so that people can get the latest code. It is literally preventing everyone from updating the repo now, and sadly sqlboiler is using a version with the decomposer commit now.

ericlagergren commented 1 year ago

Depending on what sqlboiler thinks, I’m fine with reverting the interface.

zhongduo commented 1 year ago

Depending on what sqlboiler thinks, I’m fine with reverting the interface.

I cannot speak for sqlboiler, maybe @stephenafamo can comment more. I did move the dependency before that commit to unblock users in the latest version, though they can still update repo manually.

The problem now is that currently sqlboiler will now never be able to use the latest decimal version, and I am not sure how many other framework will trigger this bug. But since this is now a public API, I am also not sure how many code repos are depending on this interface now. Maybe @kardianos will have more insight on this. But if we are convinced that the original proposal won't land and the use of this interface is minimal, there is no reason to keep it.