rbuckton / grammarkdown

Markdown-like DSL for defining grammatical syntax for programming languages.
https://rbuckton.github.io/grammarkdown/
MIT License
126 stars 24 forks source link

Investigate dropping synchronous API #59

Open rbuckton opened 4 years ago

rbuckton commented 4 years ago

To simplify the internals of grammarkdown, I'm considering dropping the synchronous APIs such as SyncHost, parseSync, bindSync, checkSync, etc. However, doing so would have a significant impact on tools such as ecmarkup.

@bakkot: If I were to make this change, ecmarkup would need to make the walk and lint functions asynchronous. If necessary, I can create a PR against ecmarkup that does this in advance of this change. The walk function shouldn't be too much trouble because its only called by itself and Spec.prototype.build (which is already async), though I haven't investigated the impact it would have on lint.

If there are scenarios that you believe would be a blocker for me removing the synchronous APIs, please let me know. If there are no blockers, I would plan to ship this change with a semver-major bump to 3.0.0.

bakkot commented 4 years ago

I think the change to ecmarkup would be straightforward, and I don't have other use-cases in mind which would require it to be synchronous. Go for it.

rbuckton commented 4 years ago

I've shipped 3.0.0-beta.0 which has the async-only API, plus cleans up a number of other obsolete methods.

bakkot commented 3 years ago

This seems to be done now, though I note that the docs still talk exclusively about bindSync and friends.

rbuckton commented 3 years ago

I have a few outstanding things to clean up before I close this, but yes its mostly done.