vaidik / commentjson

Add JavaScript or Python style comments in JSON.
MIT License
104 stars 25 forks source link

Latest lark-parser isn't compatible with commentjson #32

Closed ianfhunter closed 4 years ago

ianfhunter commented 4 years ago

https://pypi.org/project/lark-parser/#history was released 32mins ago.

import commentjson as json
/home/testuser/.local/lib/python3.6/site-packages/commentjson/__init__.py:1: in <module>
    from .commentjson import dump
/home/testuser/.local/lib/python3.6/site-packages/commentjson/commentjson.py:55: in      <module>
    serializer = Reconstructor(parser)
/home/testuser/.local/lib/python3.6/site-packages/lark/reconstruct.py:92: in __init__
    assert parser.options.maybe_placeholders == False
ianfhunter commented 4 years ago

Current work around for others affected - people can use my branch: pip install git+https://github.com/ianfhunter/commentjson.git@patch-1

I will delete this after merged

erezsh commented 4 years ago

Sorry about that! I reverted the change in 0.8.1 (already released), and will use a major version for such a change next time.

pkolbus commented 4 years ago

Hi @erezsh, what you did in lark-parser is correct according to SemVer, prior to 1.0.0 anything can change at any time as the API is explicitly unstable. It’s commentjson not constraining the dependency correctly.

That said, thanks for reverting, as that will help until commentjson can fix things.

ianfhunter commented 4 years ago

No worries, Thanks for the revert :)

vaidik commented 4 years ago

On it folks. Reviewing the PR

vaidik commented 4 years ago

Hey guys

I have merged the PRs and cut a release - 0.8.3.

@ianfhunter thanks a lot for the patch! Really appreciate it!