Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings by conditionally compiling Decimal support #191

Merged
merged 3 commits into from
Jul 15, 2024

Commits on Jul 12, 2024

  1. Fix warnings by conditionally compiling Decimal support

    This fixes the following Elixir 1.17 warnings when `:decimal` isn't
    included in the dependency list:
    
    ```
    ==> jason
        warning: Decimal.new/1 is undefined (module Decimal is not available or is yet to be defined)
        │
     94 │         decimal.new(string)
        │                 ~
        │
        └─ (jason 1.4.3) lib/decoder.ex:94:17: Jason.Decoder.float_decode_function/1
    
    warning: struct Decimal.Error is undefined (module Decimal.Error is not available or is yet to be defined)
    └─ (jason 1.4.3) lib/decoder.ex: Jason.Decoder.float_decode_function/1
    
         warning: Decimal.to_string/2 is undefined (module Decimal is not available or is yet to be defined)
         │
     242 │     [?", decimal.to_string(value, :normal), ?"]
         │                  ~
         │
         └─ (jason 1.4.3) lib/encode.ex:242:18: Jason.Encode.struct/4
    
         warning: Decimal.to_string/1 is undefined (module Decimal is not available or is yet to be defined)
         │
     231 │     [?", decimal.to_string(value), ?"]
         │                  ~
         │
         └─ (jason 1.4.3) lib/encoder.ex:231:18: Jason.Encoder.Decimal.encode/2
    ```
    fhunleth committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    acf6e97 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2024

  1. Configuration menu
    Copy the full SHA
    a74a0e6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c76db8b View commit details
    Browse the repository at this point in the history