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

Parse IDL without sequential dependency #21

Merged
merged 10 commits into from
Dec 9, 2018

Conversation

ethe
Copy link
Member

@ethe ethe commented Dec 8, 2018

Make parser does not rely on sequential definition, like:

service PingPong {
    Foo echo(1:Foo param)
}

struct Foo {
    1: optional Bar test,
    2: optional SomeInt some_int,
}

struct Bar {
    1: optional Foo test,
}

const SomeInt SOME_INT = [1, 2, 3]

typedef list<i32> SomeInt

It was not be supported in Thriftpy before, cause Thriftpy uses a one-pass parser build by Ply, and it is relies on sequence obviously. I can not find a way to solve this problem with Ply, instead of remove it totally, so I just add another step after Ply analysis to fill incomplete type definition.

@ethe ethe changed the title Parse IDL without sequence dependence Parse IDL without sequential dependency Dec 8, 2018
@ethe ethe force-pushed the feature/update-parser branch from 9594bf4 to 91c16b5 Compare December 9, 2018 11:30
@ethe ethe merged commit 4a33d1c into Thriftpy:develop Dec 9, 2018
@sicklydove
Copy link

Thanks for fixing this! I'm no longer at the same company I was at when I raised Thriftpy/thriftpy#280, but I've passed it along to a former colleague to check out :)

@ethe ethe deleted the feature/update-parser branch January 2, 2019 03:20
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.

2 participants