michalmuskala / jason

A blazing fast JSON parser and generator in pure Elixir.
Other
1.6k stars 170 forks source link

vendor Jason to prevent conflicts #110

Closed axelson closed 4 years ago

axelson commented 4 years ago

This prevents module conflicts with the user's version of Jason since both are loaded into the same beam instance (at least until #253) is addressed.

Functionally this was simply replacing :jason => :jason_vendored and Jason with JasonVendored. I only skipped the changelog (for no good reason) and the bench directory data.

Note: I plan to leave this PR open even though this branch is used by elixir-ls. I think that will facilitate seeing the changes as compared to the upstream Jason library. If we need to update to a new version of Jason the plan is to rebase this branch on top of the upstream changes (or just redo the changes).

This also formats the code which is another reason to just redo the changes.

axelson commented 4 years ago

references:

axelson commented 4 years ago

Sorry, didn't mean to submit this PR here! Was meant to be directly against https://github.com/elixir-lsp/jason

michalmuskala commented 4 years ago

I think long-term it should be possible to do a small script doing the re-writing. I don't think there's any dynamic shenanigans in Jason that would make that difficult

axelson commented 4 years ago

Yeah, it was very straightforward. If I get sufficiently annoyed with staying up to date then I'll write a script :)