Conversation
34f541f to
ce91c57
Compare
Contributor
Author
|
I've just run |
ce91c57 to
759d8ea
Compare
odarriba
reviewed
Mar 28, 2025
|
@crbelaus any update on this one? Do you need help, by any chance? |
|
I'd love to see this PR going through :) |
Contributor
Author
If someone can help testing this under Elixir 1.18 it would be great, just to confirm that things are working as expected without Jason. |
|
Hey, I've tested it now. Sorry for the delay. It works as expected. |
|
@crbelaus Hey there! Could you update your branch to latest changes in |
Elixir 1.18+ comes with the JSON module out of the box so there is no need for Jason anymore. This commit marks Jason as an optional dependency and upates the code to use JSON if available and Jason for older Elixir versions.
9fd4551 to
1646ec5
Compare
846e0b9 to
86b26c6
Compare
Contributor
|
No more warnings in an Elixir 1.19+ application without Jason 👍 |
|
Thank you so much @crbelaus ! Works like a charm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since Elixir 1.18 there is a native
JSONmodule, so new projects don't needJasonand many don't have it. This pull request updates the error tracker so:JSONmodule for Elixir 1.18 and newer. On older versions we still default toJasonjust like we did before.encode_to_iodata!function which is the most performant and provided by both libraries.JSONmodule can't pretty print likeJasondoes. Instead we are now pretty printing in the client using JSON.stringify which is widely available across all browsers.There should not be any user-facing changes. Users will still see the JSON context formatted just like they did before but now the ErrorTracker works well on Elixir 1.18 and newer projects that don't include Jason. We also don't force it for such projects as a native alternative exists.
Closes #131