Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3170

Cap integer and float sizes

    XMLWordPrintable

    Details

    • Template:
    • Epic Link:
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-02-08
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Raise errors when converting integer values out of 64 bit range, or BigDecimal values out of range for Float.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      covered by unit tests; error message

      Description

      The language specification now (PUP-3133) says that Integer and Float are capped to signed 64 bit integer, and 64 bit double precision floats (IEEE 754). This used to be unspecified, and "just work the way Ruby works". There was also a misconception in how Ruby transitions between the available fixed types and Big representations (it simply does not do widening to Big for floating point). The cap is needed because neither serialization formats nor Puppet DB can work efficiently (if at all) with values outside of the now specified range.

      We should cap the runtime size of Integers (error on under/overflow).

      We should also update / verify that the type system does not accept Integer values that are BigInteger, and that Float should not accept BigDecimal, except possibly if those data types hold values that fit 64 bit signed and IEEE 754 binary64 respectively and can be transformed to the 64 bit variants.

      This also means that we should type check attribute and variable assignments since Any does not mean "any ruby type". This last step may have performance implications.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              henrik.lindberg Henrik Lindberg
              QA Contact:
              Kurt Wall Kurt Wall
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support