Skip to content

Conversation

@pachun
Copy link

@pachun pachun commented Oct 24, 2025

Summary

This PR modernizes the Elixir SDK to work with current Elixir versions (1.14+) and updates dependencies that haven't been maintained in 7 years.

Changes

Commit 1: Update to Elixir 1.14 and modernize critical dependencies

  • Update Elixir requirement from ~> 1.7.2 to ~> 1.14
  • Update HTTPoison from >= 1.2.0 to ~> 2.0 (fixes Hackney/Erlang 25 compatibility)
  • Update Credo from ~> 0.10.0 to ~> 1.7 (was crashing on Elixir 1.14)
  • Update ExDoc from >= 0.0.0 to ~> 0.31 (Earmark was crashing)
  • Add runtime: false to dev/test dependencies (modern best practice)
  • Update test expectations to match current Expo API error format

Commit 2: Migrate from Poison to Jason

  • Replace Poison (abandoned since 2017) with Jason (actively maintained)
  • Update all JSON encoding/decoding calls throughout codebase

Commit 3: Use modern extra_applications pattern

  • Replace deprecated applications list with extra_applications
  • Remove httpoison and jason from application list (auto-inferred from deps since Elixir 1.4)

Commit 4: Remove obsolete dependencies

  • Remove dialyze (outdated, last updated 2017)
  • Remove inch_ex (Inch CI service shut down)

Commit 5: Update README

  • Remove outdated installation instructions (no longer need to add to application list)
  • Modernize code formatting

Testing

All quality checks pass:

  • mix format --check-formatted
  • mix compile --warnings-as-errors
  • mix credo --strict
  • mix docs
  • mix test (15 tests, 0 failures)

Compatibility

  • Minimum Elixir version: 1.14 (released September 2022)
  • Tested on: Elixir 1.14.5 with Erlang/OTP 25
  • Breaking changes: None for users on modern Elixir. Users on Elixir < 1.14 will need to upgrade.

Context

The project hasn't been updated in 7 years and won't compile on modern systems due to:

  • Old Erlang/OTP compatibility issues in dependencies
  • Deprecated Elixir patterns
  • Abandoned dependencies causing crashes

This PR brings the project up to current standards while maintaining all existing functionality.

This commit makes the minimum changes necessary to run the project on
modern Elixir (1.14+) and Erlang (25+).

Changes:
- Update Elixir requirement from ~> 1.7.2 to ~> 1.14
- Update HTTPoison from >= 1.2.0 to ~> 2.0 (fixes Hackney compatibility)
- Update Credo from ~> 0.10.0 to ~> 1.7 (was crashing on Elixir 1.14)
- Update ExDoc from >= 0.0.0 to ~> 0.31 (Earmark was crashing)
- Add runtime: false to dev/test dependencies (modern best practice)
- Update test expectations to match current Expo API error format

All tests pass: mix format, compile, credo, docs, and test suite.
Poison has been abandoned since 2017. Jason is the modern, actively
maintained standard for JSON in Elixir with better performance.

Changes:
- Replace {:poison, "~> 3.1.0"} with {:jason, "~> 1.4"} in deps
- Replace all Poison.encode!/encode calls with Jason.encode!/encode
- Replace all Poison.decode calls with Jason.decode
- Update application list to use :jason instead of :poison
- Update module documentation references

Note: HTTPoison still depends on Poison internally, which is fine.
We've removed all direct usage from our codebase.

All tests pass.
Since Elixir 1.4, applications are automatically inferred from the deps
list. The `applications` key is deprecated in favor of `extra_applications`
which should only list built-in OTP apps (not dependencies).

Changes:
- Replace `applications: [:logger, :httpoison, :jason]` with
  `extra_applications: [:logger]`
- :httpoison and :jason are now auto-started from deps
- Only :logger remains as it's a built-in OTP application

This follows modern Elixir conventions and removes deprecation warnings.

All tests pass.
These dependencies are no longer maintained or useful:

- dialyze (last updated 2017): Outdated Dialyzer wrapper. Modern Elixir
  projects use the built-in `mix dialyzer` or the actively maintained
  `dialyxir` package if needed.

- inch_ex: Documentation quality checker for the Inch CI service, which
  shut down years ago. No longer functional.

Removing these reduces maintenance burden and dependency bloat.

All tests pass.
Remove outdated Elixir 1.3 patterns from the installation guide.

The old pattern was necessary 7+ years ago but confuses modern users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant