Comments (7)
@mullermp Thanks to share your concern.
I have questions:
This is an issue for them because BigDecimal is a native extension gem, and they donโt have build tools installed.
I understood that situation. But Ruby users usually do install native extension to use Rails or other software. In my experience, installing build tool is common way to use Ruby language. Why they couldn't that?
I am wondering if itโs possible for you or someone on the Ruby core team to publish a pre-built native gem to alleviate the issue?
There is no plan to do that now for gem install bigdecimal
. But we have "bundled gems" technic for bigdecimal
. It means Ruby 3.4.0 will have pre-build bigdecimal
gem with ruby installation. Is it enough that?
from bigdecimal.
Thanks for your response. We have a large customer that does not have the ability to install native extension gems because those developer tools are not available on their instances.
Thanks for more information about bundled gems. It sounds like with Ruby 3.4, we can still require big decimal if Ruby was installed and it does not need to be fetched from RubyGems using bundler. Is that correct? If so, this can be closed.
from bigdecimal.
Having bigdecimal
as a bundled gem available in standard ruby installs does not help users who are using bundler to manage dependencies. If bigdecimal
is listed as a dependency by any of the gems in a users Gemfile
a bundle install
will fail if they cannot build and install native extensions. There is a number of users for the AWS SDK for Ruby that do not have environments where they can install native gems - for example, it is common to use slim docker images that do not contain build tools to keep image sizes down.
from bigdecimal.
We have a large customer that does not have the ability to install native extension gems because those developer tools are not available on their instances in their production instances.
I can assume that some people don't install the developer tools for a better security or to save the size of the instances.
However, why don't the following steps work in the some people' case?
For example, the steps may be like this in Amazon Linux 2023.
$ sudo dnf -y install gcc foo-devel # Install the compiler via the distro package or install the compiler from the source.
$ gem install bigdecimal
$ sudo dnf -y uninstall gcc foo-devel [+ perhaps other dependent packages] # Uninstall the compiler via the distro package or uninstall the compiler built from the source.
And save the instance, and deploy.
from bigdecimal.
it is common to use slim docker images that do not contain build tools to keep image sizes down.
I also understood it. But why don't use stage build? I always separate build and production images with stage build.
from bigdecimal.
I'm not sure why aws-sdk-ruby
uses bigdecimal
for deserialization of DynamoDB.
In https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes, we can use Integer
for number type, not BigDecimal
. Is there specific reason why we should use it with BigDecimal
?
from bigdecimal.
DynamoDB numbers are represented as strings and can have 38 digits of precision, which could be a loss of precision if using Integer.
from bigdecimal.
Related Issues (20)
- BigDecimal#round raises FloatDomainError regardless of exception mode HOT 2
- Comparison failure: 9.8.abs <= BigDecimal('9.8') => false HOT 4
- Inconsistent max precision affecting dump&load result HOT 4
- Inconsistency between Bigdecimal 3.0.x and 3.1.x HOT 4
- BigDecimal#n_significant_digits and #precision do not return the correct value HOT 1
- I would expect BigDecimal#divmod to return type [Int, BigDecimal] (like Integer#divmod, Float#divmod)
- mode(BigDecimal::EXCEPTION_ALL,true) did not throw an exception when bigdecimal#exponent overflowed HOT 1
- Integrate JRuby implementation into the gem
- Loss of precision on very large numbers in `to_d` HOT 1
- Incorrect calculation result after upgrading from BigDecimal 3.1.1 to 3.1.2 HOT 1
- Difference in behavior with and without BigDecimal#dev 'digit' argument
- nil.to_d inconsistent (bigdecimal/util)
- Installation Error of BigDecimal 3.1.5 in JRuby HOT 3
- ruby 3.0.6 compilation error on MacOS Sonoma 14 related to maybe_unused HOT 1
- Memory leak with BigDecimal::EXCEPTION_OVERFLOW HOT 2
- BigDecimal#whole? HOT 3
- Use RUBY_TYPED_EMBEDDABLE in BigDecimal
- Please publish 3.1.8-java gem HOT 2
- bigdecimal install error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bigdecimal.