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

Jaxon dependency maintenance status #30

Open
thbar opened this issue Mar 1, 2024 · 2 comments
Open

Jaxon dependency maintenance status #30

thbar opened this issue Mar 1, 2024 · 2 comments

Comments

@thbar
Copy link
Collaborator

thbar commented Mar 1, 2024

Jaxon is used in a couple of places in the library.

The thing is this library has not seen any commit in the last 2.5 years (https://github.com/boudra/jaxon).

I would suggest that we consider moving to something with a better maintenance ultimately, and try to reduce expanding the usage in instructor_ex.

Opening the issue to ensure we are all aware of that!

Related links:

@thmsmlr
Copy link
Owner

thmsmlr commented Mar 5, 2024

This is a great callout. I have a local branch with a prototype of implementing JSON Streaming myself.

That being said, this isn't a urgent concern for me as the JSON SPEC is unchanging and jaxon has quite a comprehensive test suite.

For me, the real reason to use change this bit of the library is to change how stream parsing actually works. Currently, when the accumulator is

{ "foo" : "ba

The stream parser only emits {, "foo", : as tokens.

Where as I'd like a stream parser that emits {, "foo", :, "ba so that I can do stream emits within a string as well.

To get this working "properly" with Jaxon was going to be a big pain. There is an alternative hacky solution where we just try parsing by appending a " and see if it's validish. But, that's jank for two reasons. First, is it possible to that appending a " can produce a valid, but different tokenstream? Second, is that although stream parsing is implemeneted as a continuation parser, the continuation fuction is hidden so you can't "fork" it in a low cost way AFAIK.

Anyways, that was more than you bargained for. When we revisit this code, i'm only going to make a change if we can also support streaming partial strings. That's a big feature in other language implementations of instructor.

@thbar
Copy link
Collaborator Author

thbar commented Mar 5, 2024

That being said, this isn't a urgent concern for me as the JSON SPEC is unchanging and jaxon has quite a comprehensive test suite.

100% agreeing ; I was mostly opening the issue to ensure we do not expand the use unknowingly, as I wasn't aware of how aware you would be or not :-)

Anyways, that was more than you bargained for.

I do appreciate the depth of feedback you provided 😄 I will mull over this, and if I have actionable ideas, will not hesitate to contribute on this.

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

No branches or pull requests

2 participants