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

Update gleam_json to 2.x #5

Merged
merged 12 commits into from
Feb 5, 2025

Conversation

SnakeDoc
Copy link
Contributor

@SnakeDoc SnakeDoc commented Dec 25, 2024

This PR closes #4

This PR is broken down into a few steps:

  1. Updates all in-range deps.
  2. Updates gleam_json's range to 2.x along with it's locked version.
  3. Fixes a deprecation introduced by gleam_stdlib update.
  4. Updates the GitHub Action's testing environment (gleam and erlang versions).
  5. Bumps semvar major version of this lib due to the new OTP27 requirement.
  • Builds Locally
  • Tests Run Locally

Let me know if I missed anything or you need something changed! 🚀

@pswsm
Copy link

pswsm commented Jan 8, 2025

looking forward to this being merged

@benjaminjellis
Copy link

It would be really useful to get this merged!

@SnakeDoc
Copy link
Contributor Author

SnakeDoc commented Feb 3, 2025

@brettkolodny Have you had a chance to review this PR yet? Any changes you need?

@brettkolodny
Copy link
Owner

Sorry! Been a bit MIA since the holidays. Going to take a look now!

@brettkolodny
Copy link
Owner

@SnakeDoc All looks good! One thing though, should the gleam_json version be instead set to gleam_json >= 1.0.0 and < 3.0.0? I believe the only breaking change for gleam_json 1.0 to 2.0 is moving what it's using on the Erlang side. May be good to be compatible with older projects!

@SnakeDoc
Copy link
Contributor Author

SnakeDoc commented Feb 4, 2025

@brettkolodny Great suggestion! I think I was just copying the existing range pattern, but you are right, it's best to be compatible with the entire 2.x range.

Let me get that fixed up sometime tonight. I'll also re-update everything else while we have the hood open 🚀

@SnakeDoc
Copy link
Contributor Author

SnakeDoc commented Feb 5, 2025

@brettkolodny Added the following:

  1. Updated all deps.
  2. Widened the gleam_json range as suggested.
  3. Took the liberty of converting all dep version ranges to compound ranges. Compound ranges are a bit easier widen over time, and more closely matches what the gleam cli uses.
  4. Fixed deprecations introduced by gleam_stdlib updates (again lol). This time we made the gleam/dynamic -> gleam/dynamic/decode switch, and replaced list.pop() with list.first() + list.drop().
  5. Updated GH Action's erlang and gleam versions.

Builds with all tests passing locally - but this has a bit more surface area than before and probably warrants a closer look.

Let me know what you think!

@brettkolodny
Copy link
Owner

Looks good to me, thank you! Will get this released now

@brettkolodny brettkolodny merged commit 2b4c1f2 into brettkolodny:main Feb 5, 2025
1 check passed
@SnakeDoc
Copy link
Contributor Author

SnakeDoc commented Feb 5, 2025

Thank you 👍

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.

Update gleam_json to 2.x
4 participants